klyn.math.geometry.Vector.normalize
method
public normalize() as Vector<Double>:
Description

Returns a unit vector with the same direction.

Returns

Normalized vector.

Throws
  • DivideByZeroException If the vector has zero length.
Example
unit = Vector<Double>(3.0, 4.0).normalize()