equals method
Implementation
@override
bool equals(Vector 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) && (v.w == w);
}
return (v.x == x) && (v.y == y);
}