1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-07 23:07:01 +09:00

Review feedback

This commit is contained in:
Mr. HeliX 2025-06-05 13:35:48 +02:00
parent 431bfe60d6
commit 9be30b6185

View file

@ -68,7 +68,7 @@ namespace PerformanceCalculator.Simulate
// Start by assuming every non miss is a meh
// This is how much increase is needed by the rest
int remainingHits = totalHits - countMiss;
int delta = targetTotal - (10 * remainingHits);
int delta = Math.Max(targetTotal - (10 * remainingHits), 0);
// Each perfect increases total by 50 (CL) or 51 (no CL) (perfect - meh = 50 or 51)
int perfects = Math.Min(delta / (perfectValue - 10), remainingHits);
@ -86,7 +86,7 @@ namespace PerformanceCalculator.Simulate
remainingHits -= countGood.Value;
// Each ok increases total by 10 (ok - meh = 10)
int oks = delta / 10;
int oks = Math.Min(delta / 10, remainingHits);
remainingHits -= oks;
// Everything else is a meh, as initially assumed