Fix some issues capping at a certain range (#1651)

This commit is contained in:
blitzmann
2018-06-17 12:10:33 -04:00
parent b7458396ac
commit 8f5060cc3e

View File

@@ -86,7 +86,10 @@ class Mutator(EqBase):
returnVal = val
else:
# need to fudge the numbers a bit. Go with the value closest to base
returnVal = min(self.maxValue, max(self.minValue, val))
if val >= 0:
returnVal = min(self.maxValue, max(self.minValue, val))
else:
returnVal = max(self.maxValue, min(self.minValue, val))
return returnVal