Beispiel #1
0
        /// <summary>
        /// Возвращает исходную точку, повёрнутую относительно принимаемой методом точки на угол,
        ///  заданный в синусом и косинусом.
        /// </summary>
        public Point GetRotated(Point point, double sin, double cos)
        {
            if (this == point)
            {
                return(new Point(x, y));
            }
            Vector toPointVector = new Vector(point, this);

            toPointVector.Rotate(sin, cos);
            return(point + toPointVector);
        }
Beispiel #2
0
        /// <summary>
        /// Вращает исходную точку относительно принимаемой методом точки на угол, заданный синусом
        /// и косинусом.
        /// </summary>
        public void Rotate(Point point, double sin, double cos)
        {
            if (this == point)
            {
                return;
            }
            Vector toPointVector = new Vector(point, this);

            toPointVector.Rotate(sin, cos);
            x = point.x + toPointVector.x;
            y = point.y + toPointVector.y;
        }