public static FDGVector2 operator -(FDGVector2 a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Subtract(b); return(temp); }
public static FDGVector2 operator +(FDGVector2 a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Add(b); return(temp); }
public static FDGVector2 operator *(float a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(b.x, b.y); temp.Multiply(a); return(temp); }
public static FDGVector2 operator *(FDGVector2 a, float b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Multiply(b); return(temp); }
public static FDGVector2 operator /(FDGVector2 a, float b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Divide(b); return(temp); }
public static FDGVector2 operator /(float a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(b.x, b.y); temp.Divide(a); return(temp); }
public override AbstractVector Add(AbstractVector v2) { FDGVector2 v22 = v2 as FDGVector2; x = x + v22.x; y = y + v22.y; return(this); }
public override AbstractVector Subtract(AbstractVector v2) { FDGVector2 v22 = v2 as FDGVector2; x = x - v22.x; y = y - v22.y; return(this); }
public override AbstractVector Subtract(AbstractVector v2) { FDGVector2 v22 = v2 as FDGVector2; X = X - v22.X; Y = Y - v22.Y; return(this); }
public override AbstractVector Add(AbstractVector v2) { FDGVector2 v22 = v2 as FDGVector2; X = X + v22.X; Y = Y + v22.Y; return(this); }
public bool Equals(FDGVector2 p) { // If parameter is null return false: if (p is null) { return(false); } // Return true if the fields match: return((X == p.X) && (Y == p.Y)); }
public bool Equals(FDGVector2 p) { // If parameter is null return false: if ((object)p == null) { return(false); } // Return true if the fields match: return((x == p.x) && (y == p.y)); }
public override bool Equals(System.Object obj) { // If parameter is null return false. if (obj == null) { return(false); } // If parameter cannot be cast to Point return false. FDGVector2 p = obj as FDGVector2; if ((System.Object)p == null) { return(false); } // Return true if the fields match: return((x == p.x) && (y == p.y)); }
public override bool Equals(object obj) { // If parameter is null return false. if (obj == null) { return(false); } // If parameter cannot be cast to Point return false. FDGVector2 p = obj as FDGVector2; if (p is null) { return(false); } // Return true if the fields match: return((X == p.X) && (Y == p.Y)); }
public FDGVector2 ScreenToGraph(Pair<int, int> iScreenPos) { FDGVector2 retVec = new FDGVector2(); retVec.x= ((float)iScreenPos.first)-(((float)(panelRight-panelLeft))/2.0f); retVec.y = ((float)iScreenPos.second) - (((float)(panelBottom - panelTop)) / 2.0f); return retVec; }
public static FDGVector2 operator /(FDGVector2 a, float b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Divide(b); return temp; }
public static AbstractVector Random() { FDGVector2 retVec = new FDGVector2(10.0f * (Util.Random() - 0.5f), 10.0f * (Util.Random() - 0.5f)); return retVec; }
public static FDGVector2 operator /(float a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(b.x, b.y); temp.Divide(a); return temp; }
public static FDGVector2 operator *(FDGVector2 a, float b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Multiply(b); return temp; }
public bool Equals(FDGVector2 p) { // If parameter is null return false: if ((object)p == null) { return false; } // Return true if the fields match: return (x == p.x) && (y == p.y); }
public static AbstractVector Random() { FDGVector2 retVec = new FDGVector2(10.0f * (Util.Random() - 0.5f), 10.0f * (Util.Random() - 0.5f)); return(retVec); }
public static FDGVector2 operator *(float a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(b.x, b.y); temp.Multiply(a); return temp; }
public static FDGVector2 operator +(FDGVector2 a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Add(b); return temp; }
public Pair<int, int> GraphToScreen(FDGVector2 iPos) { Pair<int, int> retPair = new Pair<int, int>(); retPair.first = (int)(iPos.x +(((float)(panelRight - panelLeft)) / 2.0f)); retPair.second = (int)(iPos.y + (((float)(panelBottom - panelTop)) / 2.0f)); return retPair; }
public static FDGVector2 operator -(FDGVector2 a, FDGVector2 b) { FDGVector2 temp = new FDGVector2(a.x, a.y); temp.Subtract(b); return temp; }