mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 19:45:29 +00:00
Added missing double-precision radian-to-degree conversion routines.
This commit is contained in:
parent
d19244feb5
commit
c4475ec05b
|
@ -236,6 +236,28 @@ namespace OpenTK
|
|||
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
|
||||
|
||||
#region Swap
|
||||
|
|
Loading…
Reference in a new issue