dont round off the targets

This commit is contained in:
Adrian Manteza
2022-03-17 17:12:47 +00:00
parent d4729cf812
commit 05c5dc3856
3 changed files with 10 additions and 18 deletions

View File

@ -8,15 +8,15 @@ class Target(BaseModel):
drift: float = 0.0
@classmethod
def max_drift(cls):
return 120 # let it drift...
def max_drift(cls) -> int:
return 15 # 15% elasticity, let it drift...
@classmethod
def max_drift_increment(cls):
return 10 # 10%
def max_drift_increment(cls) -> int:
return 1 # 10%
def minimum(self, drift_percent = 0.0) -> float:
return round(self.value - (self.value * drift_percent), 2)
return self.value - (self.value * drift_percent)
def maximum(self, drift_percent = 0.0) -> float:
return round(self.value + (self.value * drift_percent), 2)
return self.value + (self.value * drift_percent)