normalize
ABSTRACT
Calculates the normalized version of a vector. If the vectors magnitude is below some unspecified value epsilon, then the original vector is return instead. In all other cases, the resultant vector is a unit vector pointing in the same direction as the input.
PARAMETERS
v | a vector of numbers |
RETURN
the normalized vector
DECLARATION
func normalize(v)