TNorm

FUNCTION:

TNorm VNorm

TEMPLATE:

R3FLOAT TNorm(R3VECTOR *v);

PARAMETERS:

v - vector to be normlized

RETURN VALUE:

Length of the vector 'v' before normalization.

DESCRIPTION:

Normalizes given vector. If the length of the vector is zero, TNorm() doesn't normalize the vector and returns 0.0. VNorm() sets the vector to [1,0,0] and returns 1.0