unit
 
 
 

Returns the unit vector corresponding to a vector.

The unit vector has the same direction as the specified vector, but with a magnitude of 1.

vector unit( vector vector)

vector is the vector whose unit vector you want.

Example

unit(<<1,1,1>>)

Returns <<0.577, 0.577, 0.577>>.