Пример #1
0
        public PxPoint Reflect(PxPoint mirror)
        {
            var dx = Math.Abs(mirror.X - X);
            var dy = Math.Abs(mirror.Y - Y);

            return(new PxPoint(
                       mirror.X + (mirror.X >= X? dx:-dx),
                       mirror.Y + (mirror.Y >= Y? dy:-dy)
                       ));
        }
Пример #2
0
 public PxPoint Add(PxPoint pt)
 {
     return(new PxPoint(X + pt.X, Y + pt.Y));
 }
Пример #3
0
 public static PxMatrix Translate(PxPoint pt)
 {
     return(new PxMatrix(1, 0, 0, 1, pt.X, pt.Y));
 }