fCraft.ShapesLib.DegreesToXY C# (CSharp) Method

DegreesToXY() private method

private DegreesToXY ( float degrees, float radius, Point origin ) : Point
degrees float
radius float
origin Point
return Point
        private Point DegreesToXY( float degrees, float radius, Point origin )
        {
            Point xy = new Point();
            double radians = degrees * Math.PI / 180.0;

            xy.X = ( int )( Math.Cos( radians ) * radius + origin.X );
            xy.Y = ( int )( Math.Sin( -radians ) * radius + origin.Y );

            return xy;
        }