normalizeWithLength Method

Return a pair object containing (a) property v which is a unit vector in the direction of the input and (b) property mag which is the magnitude (length) of the input (instance) prior to normalization. If the instance (input) is a near zero length the v property of the output is undefined.

normalizeWithLength(result?: Vector3d): { mag: number, v: undefined | Vector3d }

Parameter Type Description
result Vector3d optional result.

Returns - { mag: number, v: undefined | Vector3d }

Defined in

Last Updated: 30 November, 2023