mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 12:42:34 +01:00
Merge pull request #1289 from nyuszika7h/fix-math-calc-round-single-arg
Math: Fix round() with single argument in 'calc' command
This commit is contained in:
commit
6fcf9a2829
@ -120,7 +120,7 @@ class Math(callbacks.Plugin):
|
|||||||
_mathEnv['abs'] = abs
|
_mathEnv['abs'] = abs
|
||||||
_mathEnv['max'] = max
|
_mathEnv['max'] = max
|
||||||
_mathEnv['min'] = min
|
_mathEnv['min'] = min
|
||||||
_mathEnv['round'] = lambda x, y: round(x, int(y))
|
_mathEnv['round'] = lambda x, y=0: round(x, int(y))
|
||||||
_mathSafeEnv = dict([(x,y) for x,y in _mathEnv.items()])
|
_mathSafeEnv = dict([(x,y) for x,y in _mathEnv.items()])
|
||||||
_mathSafeEnv['factorial'] = _factorial
|
_mathSafeEnv['factorial'] = _factorial
|
||||||
_mathRe = re.compile(r'((?:(?<![A-Fa-f\d)])-)?'
|
_mathRe = re.compile(r'((?:(?<![A-Fa-f\d)])-)?'
|
||||||
|
Loading…
Reference in New Issue
Block a user