equals method

  1. @override
bool equals(
  1. Vector v
)
override

Implementation

@override
bool equals(v) {
  if(v is Vector3){
    return (v.x == x) && (v.y == y) && (v.z == z);
  }
  else if(v is Vector4){
    return (v.x == x) && (v.y == y) && (v.z == z);
  }

  return (v.x == x) && (v.y == y);
}