mirror of
https://github.com/Andre0512/pyhOn.git
synced 2024-12-22 10:45:31 +00:00
Fix for float steps #22
This commit is contained in:
parent
3acd12f345
commit
8a46bd4b53
|
@ -69,4 +69,11 @@ class HonParameterRange(HonParameter):
|
|||
|
||||
@property
|
||||
def values(self) -> List[str]:
|
||||
if isinstance(self.step, float):
|
||||
result = []
|
||||
i = self.min
|
||||
while i <= self.max:
|
||||
i += self.step
|
||||
result.append(str(i))
|
||||
return result
|
||||
return [str(i) for i in range(int(self.min), int(self.max) + 1, int(self.step))]
|
||||
|
|
Loading…
Reference in a new issue