mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Remove dot from floats when there are no decimals and there's an exponent.
This commit is contained in:
parent
2cf5ede817
commit
983808f022
1 changed files with 2 additions and 0 deletions
|
@ -135,6 +135,8 @@ class outscript(object):
|
|||
news = news2
|
||||
exp = newexp
|
||||
s = neg+news
|
||||
if exp and s[-1] == '.':
|
||||
s = s[:-1] # transfrom e.g. 1.e-30 into 1e-30
|
||||
if value >= 0 or self.globalmode or not self.optsigns:
|
||||
return s + exp
|
||||
return '((float)' + s + exp + ')'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue