use ternary operator instead

This commit is contained in:
LeNitrous 2019-03-03 16:50:31 +08:00
parent a1a8246c05
commit b83d44c316
1 changed files with 2 additions and 6 deletions

View File

@ -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;
}