Added missing double-precision radian-to-degree conversion routines.
This commit is contained in:
parent
36913ab2bb
commit
4595d424f0
1 changed files with 22 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue