Esempio n. 1
0
        //绕this点把point点旋转angle弧度到新的位置
        public void Rotate(ref CDblPoint point, double angle)
        {
            double detX     = point.x - x;
            double detY     = point.y - y;
            double cosAngle = Math.Cos(angle);
            double sinAngle = Math.Sin(angle);
            double detX2    = detX * cosAngle - detY * sinAngle;
            double detY2    = detX * sinAngle + detY * cosAngle;

            point.x = x + detX2;
            point.y = y + detY2;
        }
Esempio n. 2
0
 public void SetPoint(CDblPoint Point)
 {
     x = Point.x;
     y = Point.y;
 }
Esempio n. 3
0
 public CDblPoint(CDblPoint Point)
 {
     x = Point.x;
     y = Point.y;
 }