diff --git a/Source/OpenTK/Math/MathHelper.cs b/Source/OpenTK/Math/MathHelper.cs index 4b303037..215f540f 100644 --- a/Source/OpenTK/Math/MathHelper.cs +++ b/Source/OpenTK/Math/MathHelper.cs @@ -236,6 +236,28 @@ namespace OpenTK return radians * radToDeg; } + /// + /// Convert degrees to radians + /// + /// An angle in degrees + /// The angle expressed in radians + public static double DegreesToRadians(double degrees) + { + const double degToRad = System.Math.PI / 180.0; + return degrees * degToRad; + } + + /// + /// Convert radians to degrees + /// + /// An angle in radians + /// The angle expressed in degrees + public static double RadiansToDegrees(double radians) + { + const double radToDeg = 180.0 / System.Math.PI; + return radians * radToDeg; + } + #endregion #region Swap