Aura.Channel.Skills.Magic.LightningRod.RotatePoint C# (CSharp) 메소드

RotatePoint() 개인적인 메소드

private RotatePoint ( Point point, Point pivot, double radians ) : Point
point Point
pivot Point
radians double
리턴 Point
		private Point RotatePoint(Point point, Point pivot, double radians)
		{
			var cosTheta = Math.Cos(radians);
			var sinTheta = Math.Sin(radians);

			var x = (int)(cosTheta * (point.X - pivot.X) - sinTheta * (point.Y - pivot.Y) + pivot.X);
			var y = (int)(sinTheta * (point.X - pivot.X) + cosTheta * (point.Y - pivot.Y) + pivot.Y);

			return new Point(x, y);
		}
	}