From: DrSmugleaf Date: Sat, 2 Dec 2023 16:46:01 +0000 (-0800) Subject: Fix RoundToLevels not working with an even amount of levels if the threshold is the... X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=caab89578ed2e7c4d46f9dc504cef619f3580487;p=space-station-14.git Fix RoundToLevels not working with an even amount of levels if the threshold is the same (#21863) --- diff --git a/Content.Shared/Rounding/ContentHelpers.cs b/Content.Shared/Rounding/ContentHelpers.cs index 65fcb7e367..b1525ed4ee 100644 --- a/Content.Shared/Rounding/ContentHelpers.cs +++ b/Content.Shared/Rounding/ContentHelpers.cs @@ -48,7 +48,7 @@ } var preround = toOne * (levels - 1); - if (toOne <= threshold || levels <= 2) + if (toOne < threshold || levels <= 2) { return (int) Math.Ceiling(preround); }