public void Sub(IVector2 v, IBufferedVector2D result) { Vector2d v2 = v as Vector2d; if (v2 != null) { this.Sub(v2, result); } }
public void Add(IVector2 a, IVector2 b, IBufferedVector2D result) { a.GetCoords(aux); double x = aux.X; double y = aux.Y; b.GetCoords(aux); x += aux.X; y += aux.Y; result.SetCoords(x, y); }
public static void Add(IVector2 a, IVector2 b, IBufferedVector2D result) { BufferedTuple2d aux = new BufferedTuple2d(); a.GetCoords(aux); double x = aux.X; double y = aux.Y; b.GetCoords(aux); x += aux.X; y += aux.Y; result.SetCoords(x, y); }
public void Sub(IVector2 v, IBufferedVector2D result) { BufferedVector2d bv = v as BufferedVector2d; if (bv != null) { result.SetCoords(this.X - bv.X, this.Y - bv.Y); return; } Vector2d sv = v as Vector2d; if (sv != null) { result.SetCoords(this.X - sv.x, this.Y - sv.y); return; } result.SetCoords(this.X - v.GetXDouble(), this.Y - v.GetYDouble()); }
public static void Add2(IVector2 a, IVector2 b, IBufferedVector2D result) { result.SetCoords(a.GetXDouble() + b.GetXDouble(), a.GetYDouble() + b.GetYDouble()); }
public void Add2(IVector2 v, IBufferedVector2D result) { result.SetCoords(this.X + v.GetXDouble(), this.Y + v.GetYDouble()); }
public void Mul(double t, IBufferedVector2D result) { result.SetCoords(this.X * t, this.Y * t); }
public void Mul(double v, IBufferedVector2D result) { result.SetCoords(this.x * v, this.y * v); }
public void Sub(Vector2d v, IBufferedVector2D result) { result.SetCoords(this.x - v.x, this.y - v.y); }
public void Add(Vector2d v, IBufferedVector2D result) { result.SetCoords(this.x + v.x, this.y + v.y); }