1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 11:22:57 +08:00

Use math instead of hardcoded constant values

Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
Olivier Schipper 2024-06-20 17:27:15 +02:00 committed by GitHub
parent f2bd6fac47
commit 74399542d2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,9 +29,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
GridLineRotation.BindValueChanged(_ => GridCache.Invalidate());
}
private const float sqrt3 = 1.73205080757f;
private const float sqrt3_over2 = 0.86602540378f;
private const float one_over_sqrt3 = 0.57735026919f;
private static readonly float sqrt3 = float.Sqrt(3);
private static readonly float sqrt3_over2 = sqrt3 / 2;
private static readonly float one_over_sqrt3 = 1 / sqrt3;
protected override void CreateContent()
{