Difference between revisions of "LlSqrt"
Jump to navigation
Jump to search
m (Adding an example) |
|||
Line 29: | Line 29: | ||
|also_articles | |also_articles | ||
|also_tests | |also_tests | ||
|notes | |notes=If you need the square root of two use [[SQRT2]]. | ||
|permission | |permission | ||
|negative_index | |negative_index |
Revision as of 06:04, 24 August 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: float llSqrt( float = 0.0)" style="border-bottom:1px dotted; cursor:help;">val );4 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
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
Examples
default { state_entry() { float num1 = llFrand(100.0); llOwnerSay("The square root of " + (string)num1 + " is " + (string)llSqrt(num1)); } }
Notes
If you need the square root of two use SQRT2.