mirror of
https://github.com/ppy/osu
synced 2025-01-20 21:10:49 +00:00
use ternary operator instead
This commit is contained in:
parent
a1a8246c05
commit
b83d44c316
@ -38,12 +38,8 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
public virtual void Update(Playfield playfield)
|
||||
{
|
||||
double newRate;
|
||||
if (1 + AppendRate < 1)
|
||||
newRate = Math.Max(1 + AppendRate, 1 + (AppendRate * (clock.CurrentTime / (lastObjectEndTime * 0.75))));
|
||||
else
|
||||
newRate = Math.Min(1 + AppendRate, 1 + (AppendRate * (clock.CurrentTime / (lastObjectEndTime * 0.75))));
|
||||
|
||||
double newRate = 1 + AppendRate < 1 ? Math.Max(1 + AppendRate, 1 + (AppendRate * (clock.CurrentTime / (lastObjectEndTime * 0.75)))) :
|
||||
Math.Min(1 + AppendRate, 1 + (AppendRate * (clock.CurrentTime / (lastObjectEndTime * 0.75))));
|
||||
clock.Rate = newRate;
|
||||
pitchAdjust.PitchAdjust = newRate;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user