Syntax

float llVecMag( vector vec );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

vector vec

Return value

Returns a float that is the magnitude of the vector (the undirected non-negative distance from vec to <0.0, 0.0, 0.0>).

Examples

default {
    state_entry()
    {
        vector input = <1.0,2.0,3.0>;
        llSay(0,"The magnitude of "+(string)input+" is "+(string)llVecMag(input) + ".");
    }
}

Notes

See also

Functions