aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
index 47b3670a7..6c09cdc59 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNumericTextBox.cs
@@ -211,7 +211,8 @@ namespace Tango.Touch.Controls
}
if (Step > 0)
{
- value = Math.Round(value / Step, MidpointRounding.AwayFromZero) * Step;
+ int coef = (int)((value + Step - 1) / Step);
+ value = coef * Step;
}
if(Minimum > 0 && value < Minimum)
{