public static capex.util.Vector2 multiplyVector(capex.util.Matrix33 a, capex.util.Vector2 b) { var x = a.v[0] * b.x + a.v[1] * b.y + a.v[2] * 1.00; var y = a.v[3] * b.x + a.v[4] * b.y + a.v[5] * 1.00; return(capex.util.Vector2.create(x, y)); }
public static capex.util.Vector2 create(double x, double y) { var v = new capex.util.Vector2(); v.x = x; v.y = y; return(v); }
public double distance(capex.util.Vector2 b) { var dist = (y - b.y) * (y - b.y) + (x - b.x) * (x - b.x); return(cape.Math.sqrt(dist)); }
public capex.util.Vector2 multiply(capex.util.Vector2 b) { x *= b.x; y *= b.y; return(this); }
public capex.util.Vector2 subtract(capex.util.Vector2 b) { x -= b.x; y -= b.y; return(this); }
public capex.util.Vector2 add(capex.util.Vector2 b) { x += b.x; y += b.y; return(this); }