IMPOWER
Returns a complex number raised to an integer power.
Syntax
expression.IMPOWER(arg1, arg2);
expression - A variable that represents a ApiWorksheetFunction class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| arg1 | Required | ApiRange | ApiName | number | A complex number expressed in the x + yi or x + yj form. | |
| arg2 | Required | ApiRange | ApiName | number | The power to which the complex number will be raised. |
Returns
number
Example
This example shows how to return a complex number raised to an integer power.
- Code
- Result
// 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));