Syntax

vector llVecNorm( vector vec );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

vector vec
Any valid vector

If vec is a ZERO_VECTOR, than the value returned is a ZERO_VECTOR.

Return value

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

Examples

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

Notes

See also

Functions

Deep notes

Issues