OsVecMagSquare
From OpenSimulator
(Difference between revisions)
m (Change See Also) |
|||
Line 5: | Line 5: | ||
|function_syntax=float osVecMagSquare(vector a) | |function_syntax=float osVecMagSquare(vector a) | ||
|ossl_example= | |ossl_example= | ||
− | |description= | + | |description= returns the square of the magnitude of vector a. This saves a square root slow operation. |
|additional_info= | |additional_info= | ||
|ossl_example=<source lang="lsl"> | |ossl_example=<source lang="lsl"> |
Revision as of 17:39, 1 June 2021
float osVecMagSquare(vector a)
| |
returns the square of the magnitude of vector a. This saves a square root slow operation. | |
Threat Level | No threat level specified |
Permissions | No permissions specified |
Extra Delay | 0 seconds |
Example(s) | |
// // osVecMagSquare Script Example // Author: djphil // default { state_entry() { llSay(PUBLIC_CHANNEL, "Touch to see osVecMagSquare usage."); } touch_start(integer number) { vector input = <1.0, 2.0, 3.0>; llSay(PUBLIC_CHANNEL, "The square root of the magnitude of " + (string)input + " is " + (string)osVecMagSquare(input) + "."); } } |
See Also
- osVecMagSquare
- osVecDistSquare