@override double dot(Vector v) { double temp = x * v.x + y * v.y; if(v is Vector3){ temp += z * v.z; } else if(v is Vector4){ temp += z * v.z+ w * v.w; } return temp; }