Force precedence of constant arithmetic

This commit is contained in:
Oliver Booth 2022-04-20 18:37:02 +01:00
parent 1fc22cc99c
commit 8f40dd8617
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
1 changed files with 1 additions and 1 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 MathF.PI * value / 180.0f;
return value * (MathF.PI / 180.0f);
}
/// <summary>