sub2 method

Vector3 sub2(
  1. Vector a,
  2. Vector b
)

Implementation

Vector3 sub2(Vector a, Vector b) {
  x = a.x - b.x;
  y = a.y - b.y;
  if((a is Vector3 && b is Vector3)){
    z = a.z - b.z;
  }
  else if((a is Vector4 && b is Vector4)){
    z = a.z - b.z;
  }
  else if((a is Vector3 && b is Vector4)){
    z = a.z - b.z;
  }
  else if((a is Vector4 && b is Vector3)){
    z = a.z - b.z;
  }
  return this;
}