コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
 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);
     }
 }
コード例 #6
0
 public void PremulAndSetInto(BuffVector2d v)
 {
     v.set(v.getX() * getM00() + v.getY() * getM10(),
           v.getX() * getM01() + v.getY() * getM11());
 }
コード例 #7
0
 public void MulAndSetInto(BuffVector2d v)
 {
     v.set(getM00() * v.getX() + getM01() * v.getY(),
           getM10() * v.getX() + getM11() * v.getY());
 }
コード例 #8
0
 public Vector2d Premul(BuffVector2d v)
 {
     return(new Vector2d(v.getX() * getM00() + v.getY() * getM10(),
                         v.getX() * getM01() + v.getY() * getM11()));
 }
コード例 #9
0
 public Vector2d Mul(BuffVector2d v)
 {
     return(new Vector2d(getM00() * v.getX() + getM01() * v.getY(),
                         getM10() * v.getX() + getM11() * v.getY()));
 }
コード例 #10
0
 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()));
 }