예제 #1
0
        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);
        }
예제 #2
0
        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));
        }
예제 #3
0
 public double getDistanceL1(BuffPoint2d other)
 {
     return(Math.Abs(other.getX() - getX())
            + Math.Abs(other.getY() - getY()));
 }
예제 #4
0
 public double getDistanceCuad(BuffPoint2d other)
 {
     return(Square(other.getX() - getX())
            + Square(other.getY() - getY()));
 }