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:
parent
f2bd6fac47
commit
74399542d2
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user