mag

 
 
 

Returns the magnitude of a vector. This is the length of the vector.

float mag(vector vector)

vector is the vector whose magnitude you want.

The mag function converts a vector into a floating point number using the following formula.

Example

mag(<<7,8,9>>)

Returns 13.928.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License