From d41acf34cc7f23f79da4853cc6803069c16090f3 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Wed, 23 May 2012 12:10:14 +0200 Subject: [PATCH] Math: Add cbrt() function --- plugins/Math/plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/Math/plugin.py b/plugins/Math/plugin.py index ea03b0064..00a78cf67 100644 --- a/plugins/Math/plugin.py +++ b/plugins/Math/plugin.py @@ -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