normalizeWithDefault Method

Normalize this vector, using given xyz as default if length is zero.

  • if this instance and x,y,z are both 000, return unit x vector.

normalizeWithDefault(x: number, y: number, z: number, result?: Vector3d): Vector3d

Parameter Type Description
x number x value for default result
y number y value for default result
z number z value for default result
result Vector3d optional pre-allocated result.

Returns - Vector3d

Defined in

Last Updated: 21 November, 2024