vector3.scale
The vector multiplied by a scalar.
Usage
Vector3.scale(v: Vector3, s: number): Vector3Parameters
vVector3The vector to scale. Required. In model.
snumberThe factor; negative reverses the direction.
Returns
The vector s · v; NaN when a coordinate is NaN or two infinities cancel.
Use instead
vector3.unit: to get length 1, which also reports a vector with no direction
Example
Vector3.scale(Vector3.of(1, 2, 3), 2) // → { x: 2, y: 4, z: 6 }