LlSqrt
Looking for the current API? Open the llSqrt reference →
Function notes
For imaginary results (val < 0.0), a Math Error is triggered under LSO , or 'NaN' (Not A Number) is returned under Mono
Return value notes
Returns a float that is the square root of
val.Caveats
- Crashes the script if passed a negative number.
Examples
default
{
state_entry()
{
float num1 = llFrand(100.0);
llOwnerSay("The square root of " + (string)num1 + " is " + (string)llSqrt(num1));
}
}Notes
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.