mirror of
https://github.com/osukey/osukey.git
synced 2025-04-29 02:37:25 +09:00
replace manual code with existing method
This commit is contained in:
parent
921d7e4d89
commit
fa00f8b92a
@ -90,12 +90,11 @@ namespace osu.Game.Tests.Visual.Editing
|
|||||||
|
|
||||||
private Vector2 getPositionForDivisor(int divisor)
|
private Vector2 getPositionForDivisor(int divisor)
|
||||||
{
|
{
|
||||||
float relativePosition = (float)Math.Clamp(divisor, 0, 16) / 16;
|
float localX = 1 - 1 / (float)divisor;
|
||||||
var sliderDrawQuad = tickSliderBar.ScreenSpaceDrawQuad;
|
return tickSliderBar.ToScreenSpace(new Vector2(
|
||||||
return new Vector2(
|
localX,
|
||||||
sliderDrawQuad.TopLeft.X + sliderDrawQuad.Width * relativePosition,
|
0.5f
|
||||||
sliderDrawQuad.Centre.Y
|
));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user