llSqrt

From Second Life Wiki
Revision as of 17:31, 22 May 2007 by Tigran Vuckovic (talk | contribs) (Adding an example)
Jump to navigation Jump to search

Summary

Function: float llSqrt( float = 0.0)" style="border-bottom:1px dotted; cursor:help;">val );

Returns a float that is the square root of val.

• float val positive number (val >= 0.0)

Triggers a Math Error for imaginary results (val < 0.0)

Caveats

  • Crashes the script if passed a negative number.
All Issues ~ Search JIRA for related Bugs

Examples

default
{
  state_entry()
  {
    float num1 = llFrand(100.0);

    llOwnerSay("The square root of " + (string)num1 + " is " + (string)llSqrt(num1));
  }
}

See Also

Functions

•  llLog
•  llLog10
•  llPow

Deep Notes

Search JIRA for related Issues

Signature

function float llSqrt( float val );