Fix RoundToLevels not working with an even amount of levels if the threshold is the same (#21863)

This commit is contained in:
DrSmugleaf
2023-12-02 08:46:01 -08:00
committed by GitHub
parent 8d0e35126c
commit caab89578e

View File

@@ -48,7 +48,7 @@
}
var preround = toOne * (levels - 1);
if (toOne <= threshold || levels <= 2)
if (toOne < threshold || levels <= 2)
{
return (int) Math.Ceiling(preround);
}