public void PremulAndSetInto(BuffPoint2d p)
        {
            double x = p.getX() * getM00() + p.getY() * getM10() + getM20();
            double y = p.getX() * getM01() + p.getY() * getM11() + getM21();
            double z = p.getX() * getM02() + p.getY() * getM12() + getM22();

            p.set(x / z, y / z);
        }
        public Point2d Premul(BuffPoint2d p)
        {
            double x = p.getX() * getM00() + p.getY() * getM10() + getM20();
            double y = p.getX() * getM01() + p.getY() * getM11() + getM21();
            double z = p.getX() * getM02() + p.getY() * getM12() + getM22();

            return(new Point2d(x / z, y / z));
        }
 public void PremulAndSetInto(BuffPoint2 p)
 {
     if (p is BuffVector2d)
     {
         this.PremulAndSetInto((BuffPoint2d)p);
     }
     else
     {
         BuffPoint2d _p = new BuffPoint2d(p);
         this.PremulAndSetInto(_p);
         _p.getInto(p);
     }
 }
示例#4
0
 public double getDistanceL1(BuffPoint2d other)
 {
     return(Math.Abs(other.getX() - getX())
            + Math.Abs(other.getY() - getY()));
 }
示例#5
0
 public double getDistanceCuad(BuffPoint2d other)
 {
     return(Square(other.getX() - getX())
            + Square(other.getY() - getY()));
 }
示例#6
0
 public double getDistance(BuffPoint2d other)
 {
     return(Math.sqrt(getDistanceCuad(other)));
 }