public void PremulAndSetInto(BuffVector2d v) { double x = v.getX() * getM00() + v.getY() * getM10(); double y = v.getX() * getM01() + v.getY() * getM11(); v.set(x, y); }
public void MulAndSetInto(BuffVector2d v) { double x = getM00() * v.getX() + getM01() * v.getY(); double y = getM10() * v.getX() + getM11() * v.getY(); v.set(x, y); }
public Vector2d Premul(BuffVector2d v) { double x = v.getX() * getM00() + v.getY() * getM10(); double y = v.getX() * getM01() + v.getY() * getM11(); return(new Vector2d(x, y)); }
public Vector2d Mul(BuffVector2d v) { double x = getM00() * v.getX() + getM01() * v.getY(); double y = getM10() * v.getX() + getM11() * v.getY(); return(new Vector2d(x, y)); }
public void PremulAndSetInto(BuffVector2 v) { if (v is BuffVector2d) { this.PremulAndSetInto((BuffVector2d)v); } else { BuffVector2d _v = new BuffVector2d(v); this.PremulAndSetInto(_v); _v.getInto(v); } }
public void PremulAndSetInto(BuffVector2d v) { v.set(v.getX() * getM00() + v.getY() * getM10(), v.getX() * getM01() + v.getY() * getM11()); }
public void MulAndSetInto(BuffVector2d v) { v.set(getM00() * v.getX() + getM01() * v.getY(), getM10() * v.getX() + getM11() * v.getY()); }
public Vector2d Premul(BuffVector2d v) { return(new Vector2d(v.getX() * getM00() + v.getY() * getM10(), v.getX() * getM01() + v.getY() * getM11())); }
public Vector2d Mul(BuffVector2d v) { return(new Vector2d(getM00() * v.getX() + getM01() * v.getY(), getM10() * v.getX() + getM11() * v.getY())); }
public double AngleTo(BuffVector2d other) { // http://stackoverflow.com/questions/2150050/finding-signed-angle-between-vectors return(Math.atan2(getX() * other.getY() - getY() * other.getX(), getX() * other.getX() + getY() * other.getY())); }