scale2 method

Vector3 scale2(
  1. double scalar, [
  2. Vector3? target
])

Multiply all the components of the vector with a scalar. @param target The vector to save the result in.

Implementation

Vector3 scale2(double scalar, [Vector3? target]){
  target ??= Vector3.zero();
  target.x = scalar * x;
  target.y = scalar * y;
  target.z = scalar * z;
  return target;
}