Skip to content

llPow

float llPow(float Value, float Exponent)

Returns the Value raised to the power Exponent, or returns 0 and triggers Math Error for imaginary results.

Returns the Value raised to the Exponent.

Parameters
Value (float)
Exponent (float)
default {
state_entry() {
llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) ("
+ (string)llSqrt(5) + ").");
}
}
  • If exponent is a static integer and not a variable, llPow is dramatically slower than simple repeated multiplication. For example, it’s much faster to use val = base*base*base instead of val = llPow(base, 3).
  • Triggers a Math Error for imaginary results if not compiled in Mono.