mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
Make ForceFloat more robust on non-float input.
It was designed so that only ints and floats should be accepted. But for safety, and for reuse, make that "any non-float" so that long integers are also truncated to F32.
This commit is contained in:
parent
13663ff077
commit
e40c52075b
1 changed files with 1 additions and 1 deletions
|
@ -258,7 +258,7 @@ def zstr(s):
|
|||
|
||||
def ff(x):
|
||||
"""Force x to be a float"""
|
||||
if type(x) == int:
|
||||
if type(x) != float:
|
||||
x = F32(float(x))
|
||||
return x
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue