Added missing double-precision radian-to-degree conversion routines.

This commit is contained in:
the_fiddler 2011-02-08 20:10:42 +00:00
parent 36913ab2bb
commit 4595d424f0

View file

@ -236,6 +236,28 @@ namespace OpenTK
return radians * radToDeg; return radians * radToDeg;
} }
/// <summary>
/// Convert degrees to radians
/// </summary>
/// <param name="degrees">An angle in degrees</param>
/// <returns>The angle expressed in radians</returns>
public static double DegreesToRadians(double degrees)
{
const double degToRad = System.Math.PI / 180.0;
return degrees * degToRad;
}
/// <summary>
/// Convert radians to degrees
/// </summary>
/// <param name="radians">An angle in radians</param>
/// <returns>The angle expressed in degrees</returns>
public static double RadiansToDegrees(double radians)
{
const double radToDeg = 180.0 / System.Math.PI;
return radians * radToDeg;
}
#endregion #endregion
#region Swap #region Swap