public float CrossProduct(Vec2 rhs) { return((this.x * rhs.y) - (rhs.x * this.y)); }
public Vec2(Vec2 rhs) { Initialise(rhs.x, rhs.y); }
//public Vec2 Normalize(Vec2 otherVec) //{ // float mag = otherVec.Magnitude(); // if (mag > 1) // { // float invmag = 1 / mag; // return new Vec2(x * invmag, y * invmag); // } // return this; //} public float DotProduct(Vec2 rhs) { return((x * rhs.x) + (y * rhs.y)); }