mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 23:58:20 +00:00
str() doesn't return a fully-expanded float. repr() does.
This commit is contained in:
parent
6ec2667bf3
commit
025f0f8440
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ class outscript(object):
|
|||
elif not self.globalmode:
|
||||
# Important inside lists!!
|
||||
return '((float)' + str(int(value)) + ')'
|
||||
s = str(value)
|
||||
s = repr(value)
|
||||
if s in ('inf', '-inf', 'nan'):
|
||||
return '((float)"' + s + '")' # this shouldn't appear in globals
|
||||
# Try to remove as many decimals as possible but keeping the F32 value intact
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue