VectorNorm


Normalizes a vector. Each axis of the vector is divided by the vector's length. This changes the vector proportionally so that it has a length of one. Syntax:

normvec=VectorNorm(vector);


The Math
normvec=(x/|v|, y/|v|, z/|v|)

Where |v| is the length of the vector.


Geometrical Application
The given vector is shown in red. The green vector is the normalized result. The red vector could have any length, but the normalized result will always have a length of one.