LlVecNorm

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Buggy
Function: vector llVecNorm( vector vec );
13 Function ID
0.0 Delay
10.0 Energy

Returns the vector that is vec normalized (a unit vector sharing the same direction as vec).

• vector vec Any valid vector

Functionally equivalent to: vec / llVecMag(vec))

Caveats

  • Will return <0.0, 0.0, 0.0> when <0.0, 0.0, 0.0> is given as input.

Important Issues

~ Search JIRA for related Bugs
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    llVecNorm returns zero vector as result when input is below a certain magnitude

Examples

 
default {
    state_entry()
    {
        vector input = <1.0,2.0,3.0>;
        llSay(0,"The unit vector on "+(string)input+" is: "+(string)llVecNorm(input) );
    }
}
 

See Also

Functions

•  llVecMag
•  llVecDist

Deep Notes

Issues

~ Search JIRA for related Issues
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    llVecNorm returns zero vector as result when input is below a certain magnitude
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
Personal tools
In other languages