LlPow
Looking for the current API? Open the llPow reference →
Function notes
Returns NaN when
base is negative and exponent is not an integer (an imaginary result, (exponent != (integer)exponent) && (base < 0.0)).Return value notes
Caveats
- If
exponentis a static integer and not a variable, llPow is dramatically slower than simple repeated multiplication, i.e. it's much faster to doval = base*base*baseinstead ofval = llPow(base, 3). - Triggers a Math Error for imaginary results if not compiled in Mono.
Examples
default {
state_entry() {
llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) ("
+ (string)llSqrt(5) + ").");
}
}See also: functions
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.