跳到主要内容

IMPOWER

返回复数的整数次幂。

语法

expression.IMPOWER(arg1, arg2);

expression - 表示 ApiWorksheetFunction 类的变量。

参数

名称必需/可选数据类型默认值描述
arg1必需ApiRange | ApiName | numberx + yix + yj 形式表示的复数。
arg2必需ApiRange | ApiName | number复数将被提升到的幂次。

返回值

number

示例

此示例演示如何返回复数的整数幂。

// How to get the result from raising into power of a complex number.

// Use a function to get the result from the power.

let worksheet = Api.GetActiveSheet();
let func = Api.WorksheetFunction;
worksheet.GetRange("A1").SetValue(func.IMPOWER("-2+2.5i", -3));