llVecNorm
Revision as of 01:56, 23 May 2009 by Rael Delcon (talk | contribs)
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: vector llVecNorm( vector vec );13 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a vector that is the unit vector along the direction set by vec (vec / llVecMag(vec)) (i.e. llVecNorm() "normalizes" the vector).
• vector | vec | – | Any valid vector |
Caveats
Examples
<lsl> default {
state_entry() { vector input = <1.0,2.0,3.0>; llSay(0,"The unit vector on "+(string)input+" is: "+(string)llVecNorm(input) ); }
}
</lsl>