System.Drawing.PieChart.PieSlice.PeripheralPoint C# (CSharp) Method

PeripheralPoint() protected method

Calculates the point on ellipse periphery for angle.
protected PeripheralPoint ( float xCenter, float yCenter, float semiMajor, float semiMinor, float angleDegrees ) : PointF
xCenter float /// x-coordinate of the center of the ellipse. ///
yCenter float /// y-coordinate of the center of the ellipse. ///
semiMajor float /// Horizontal semi-axis. ///
semiMinor float /// Vertical semi-axis. ///
angleDegrees float /// Angle (in degrees) for which corresponding periphery point has to /// be obtained. ///
return System.Drawing.PointF
        protected PointF PeripheralPoint(float xCenter, float yCenter, float semiMajor, float semiMinor, float angleDegrees)
        {
            double angleRadians = angleDegrees * Math.PI / 180;
            return new PointF(xCenter + (float)(semiMajor * Math.Cos(angleRadians)), yCenter + (float)(semiMinor * Math.Sin(angleRadians)));
        }