Get rid of float error when changing vector length via scrolling

This commit is contained in:
DarkPhoenix
2019-07-03 20:07:19 +03:00
parent 4448d7e62f
commit 5857413285

View File

@@ -23,6 +23,8 @@ import math
# noinspection PyPackageRequirements
import wx
from eos.utils.float import floatUnerr
class VectorPicker(wx.Window):
@@ -193,7 +195,7 @@ class VectorPicker(wx.Window):
def OnWheel(self, event):
amount = 0.1 * event.GetWheelRotation() / event.GetWheelDelta()
self._length = min(max(self._length + amount, 0.0), 1.0)
self._length = floatUnerr(min(max(self._length + amount, 0.0), 1.0))
self.Refresh()
self.SendChangeEvent()