negate method

Vector3 negate()

Inverts this vector - i.e. sets x = -x, y = -y and z = -z.

Implementation

Vector3 negate() {
  x = -x;
  y = -y;
  z = -z;

  return this;
}