mirror of https://github.com/ppy/osu
use ternary operator instead
This commit is contained in:
parent
a1a8246c05
commit
b83d44c316
|
@ -38,12 +38,8 @@ public virtual void ApplyToBeatmap(Beatmap<T> beatmap)
|
|||
|
||||
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