Math: Add cbrt() function

This commit is contained in:
nyuszika7h 2012-05-23 12:10:14 +02:00
parent 5be287b536
commit d41acf34cc
1 changed files with 3 additions and 0 deletions

View File

@ -102,7 +102,10 @@ class Math(callbacks.Plugin):
return cmath.sqrt(x)
else:
return math.sqrt(x)
def _cbrt(x):
return math.pow(x, 1.0/3)
_mathEnv['sqrt'] = _sqrt
_mathEnv['cbrt'] = _cbrt
_mathEnv['abs'] = abs
_mathEnv['max'] = max
_mathEnv['min'] = min