mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Math: Fix handling of negative integers in @calc.
This commit is contained in:
parent
01278dc56c
commit
3cc52aefca
@ -201,8 +201,8 @@ class Math(callbacks.Plugin):
|
||||
else:
|
||||
i = float(s)
|
||||
x = complex(i)
|
||||
if x == abs(x):
|
||||
x = abs(x)
|
||||
if x.imag == 0:
|
||||
x = x.real
|
||||
# Need to use string-formatting here instead of str() because
|
||||
# use of str() on large numbers loses information:
|
||||
# str(float(33333333333333)) => '3.33333333333e+13'
|
||||
|
Loading…
Reference in New Issue
Block a user