C4 Engine
C4 Engine API Documentation

Line3D::Unitize

Defined in:  TSLine3D.h
Unitizes the weight of a line.
Prototype

Line3D& Unitize(void);

Description
The Unitize function multiplies a line by the inverse magnitude of its weight, which is the 3D direction component. After calling this function, the direction component has unit length, and the magnitude of the moment component is the perpendicular distance between the origin and the line.

The return value is a reference to the line object.