Use MathF.PI instead of Math.PI with cast

This commit is contained in:
Oliver Booth 2022-04-20 18:34:49 +01:00
parent facc0834f0
commit b107360190
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ public static class SingleExtensions
/// <returns>The result of π * <paramref name="value" /> / 180.</returns>
public static float DegreesToRadians(this float value)
{
return (float)Math.PI * value / 180.0f;
return MathF.PI * value / 180.0f;
}
/// <summary>
@ -100,7 +100,7 @@ public static class SingleExtensions
/// <returns>The result of π * <paramref name="value" /> / 180.</returns>
public static float RadiansToDegrees(this float value)
{
return (float)Math.PI * value / 180.0f;
return MathF.PI * value / 180.0f;
}
/// <summary>