Pow - method of the Pm object
Computes the value of "x raised to the power of y".
Double Pow(Double nX, Double nY)
|nX||(Double) Base number|
|nY||(Double) Requested exponent|
This method is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This method is also functional in Web panels.
If the computation results in a complex number, then the method returns NaN
. This means that in reality the nX
should not be a negative number.
The high value of the nY exponent may easily lead to floating point overflow returning the Infinity value.
var a = 3;
var b = Pm.Pow(a, 2); //Returns 9
b = Pm.Pow(a, 1 / 3); //Returns "third root of three"