normalizeWithLength Method
Return a normalized instance and instance length.
normalizeWithLength(result?: Vector3d): { mag: number, v: undefined | Vector3d }
@returns object containing the properties:
v
: unit vector in the direction of the instance, or undefined ifmag
is near zeromag
: length of the instance prior to normalization
Parameter | Type | Description |
---|---|---|
result | Vector3d | optional pre-allocated object to return as v property |
Returns - { mag: number, v: undefined | Vector3d }
object containing the properties:
v
: unit vector in the direction of the instance, or undefined ifmag
is near zeromag
: length of the instance prior to normalization
Defined in
- geometry3d/Point3dVector3d.ts Line 946
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.