Skip to content

Commit

Permalink
Simplify divmod
Browse files Browse the repository at this point in the history
  • Loading branch information
Syriiin committed May 2, 2024
1 parent 76f18b8 commit cd89fa3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PerformanceCalculator/Simulate/ManiaSimulateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected override Dictionary<HitResult, int> GenerateHitResults(double accuracy
// There is no difference in accuracy between them, so just halve arbitrarily (favouring perfects for an odd number).
int greatsAndPerfects = Math.Min(delta / 5, remainingHits);
greats = greatsAndPerfects / 2;
int perfects = greats.Value + (greatsAndPerfects % 2);
int perfects = greatsAndPerfects - greats.Value;
delta -= (greats.Value + perfects) * 5;
remainingHits -= greats.Value + perfects;

Expand Down

0 comments on commit cd89fa3

Please sign in to comment.