예제 #1
0
        public Point2D Rotate(Point2D center, GameAngle angle)
        {
            float cos, sin;

            angle.CosSin(out cos, out sin);

            return(RotatePointInternal(this, center, cos, sin));
        }
예제 #2
0
        public static Point2D[] Rotate(IEnumerable <Point2D> values, Point2D center, GameAngle angle)
        {
            #region Argument Check

            if (values == null)
            {
                throw new ArgumentNullException("values");
            }

            #endregion

            float cos, sin;
            angle.CosSin(out cos, out sin);

            return(values.Select(value => RotatePointInternal(value, center, cos, sin)).ToArray());
        }