forked from MoonsideGames/MoonWorks
radian and degree conversions on Fix64
parent
b23792acd0
commit
d32bbcd537
|
@ -321,6 +321,22 @@ namespace MoonWorks.Math.Fixed
|
||||||
return clampedPiOver2;
|
return clampedPiOver2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Converts degrees to radians.
|
||||||
|
/// </summary>
|
||||||
|
public static Fix64 ToRadians(Fix64 degrees)
|
||||||
|
{
|
||||||
|
return degrees * (Pi / new Fix64(180));
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Converts radians to degrees.
|
||||||
|
/// </summary>
|
||||||
|
public static Fix64 ToDegrees(Fix64 radians)
|
||||||
|
{
|
||||||
|
return radians * (new Fix64(180) / Pi);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the sine of the specified angle.
|
/// Returns the sine of the specified angle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue