Difference between revisions of "LlPow"

From Second Life Wiki
Jump to navigation Jump to search
(Added Example)
m (Line too long.)
Line 13: Line 13:
default {
default {
     state_entry() {
     state_entry() {
           llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) (" + llSqrt(5) + ").");
           llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) ("  
                      + (string)llSqrt(5) + ").");
     }
     }
}</pre>
}</pre>

Revision as of 15:31, 12 October 2007

Summary

Function: float llPow( float base, float exponent );

Returns a float that is base raised to the power exponent (baseexponent)

• float base
• float exponent

Triggers a Math Error for imaginary results ((exponent != (integer)exponent) && (base < 0.0))

Caveats

  • Can crash the script.
All Issues ~ Search JIRA for related Bugs

Examples

default {
     state_entry() {
          llOwnerSay("llPow(5, .5) (" + (string)llPow(5, .5) + ") is equal to llSqrt(5) (" 
                      + (string)llSqrt(5) + ").");
     }
}

See Also

Functions

•  llLog
•  llLog10
•  llSqrt

Deep Notes

Search JIRA for related Issues

Signature

function float llPow( float base, float exponent );