float llPow(float base, float exp)
Returns base raised to the
exp.
Example:
llSay(0,(string)llPow(3.0, 2.0)); // returns 9 (3*3)
llSay(0,(string)llPow(4.0, 5.0)); // returns 1024 (4*4*4*4*4)
Remember, roots can be
expressed as powers. For example,
llSqrt(4.0); //Using the math library's square root function
llPow(4.0, 1.0/2.0); //Using a power to return a square root
This means that one can manage a cube root, or any other root. A cube root would be expressed as
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Math