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: Vector3d | undefined }

Parameter Type Description
result Vector3d optional result.

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

Defined in

Last Updated: 13 June, 2024