Fix typo in 'ticks-per-row' rounding logic for ladder

This commit is contained in:
John Colvin committed 2022-02-28 14:21:31 -05:00
1 parent 9c5856f247
commit 1dec925c73
1 file changed
+1 -1
@@ -260,7 +260,7 @@ namespace mbts.spark {
var ticks_per_dollar = (uint)(tf.low_tick.tick_base / tf.low_tick.tick_unit);
// if ticks_per_row is greater than ticks_per_dollar, round to a multiple of ticks_per_dollar
if (ticks_per_row > ticks_per_dollar) {
return (uint)Math.Floor((double)(ticks_per_row / ticks_per_dollar));
return (uint)(ticks_per_dollar * Math.Floor((double)(ticks_per_row / ticks_per_dollar)));
} else if (ticks_per_row == ticks_per_dollar) {
return ticks_per_row;
} else {