scaleToLength Method

Return a vector in the direction of this but with specified length.

scaleToLength(length: number, result?: Vector3d): undefined | Vector3d

@returns scaled instance vector, or undefined if the instance magnitude is too small

Parameter Type Description
length number desired length of vector
result Vector3d optional preallocated result to populate and return

Returns - undefined | Vector3d

scaled instance vector, or undefined if the instance magnitude is too small

Defined in

Last Updated: 17 December, 2024