From 2659b960085b5b67e6e4a65605610404ef7568d5 Mon Sep 17 00:00:00 2001
From: Alexander Rose <alex.rose@rcsb.org>
Date: Fri, 2 Aug 2019 17:16:47 -0700
Subject: [PATCH] added math.cbrt to mol-script

---
 src/mol-script/language/symbol-table/core.ts | 3 +--
 src/mol-script/runtime/query/table.ts        | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mol-script/language/symbol-table/core.ts b/src/mol-script/language/symbol-table/core.ts
index fa0a801d9..bf1ca0d0b 100644
--- a/src/mol-script/language/symbol-table/core.ts
+++ b/src/mol-script/language/symbol-table/core.ts
@@ -121,6 +121,7 @@ const math = {
     roundInt: unaryOp(Type.Num),
     abs: unaryOp(Type.Num),
     sqrt: unaryOp(Type.Num),
+    cbrt: unaryOp(Type.Num),
     sin: unaryOp(Type.Num),
     cos: unaryOp(Type.Num),
     tan: unaryOp(Type.Num),
@@ -189,5 +190,3 @@ export const SymbolMap = (function() {
 })();
 
 export default table;
-
-
diff --git a/src/mol-script/runtime/query/table.ts b/src/mol-script/runtime/query/table.ts
index ee5e68247..082ce387a 100644
--- a/src/mol-script/runtime/query/table.ts
+++ b/src/mol-script/runtime/query/table.ts
@@ -119,6 +119,7 @@ const symbols = [
     C(MolScript.core.math.roundInt, (ctx, v) => Math.round(v[0](ctx))),
     C(MolScript.core.math.abs, (ctx, v) => Math.abs(v[0](ctx))),
     C(MolScript.core.math.sqrt, (ctx, v) => Math.sqrt(v[0](ctx))),
+    C(MolScript.core.math.cbrt, (ctx, v) => Math.cbrt(v[0](ctx))),
     C(MolScript.core.math.sin, (ctx, v) => Math.sin(v[0](ctx))),
     C(MolScript.core.math.cos, (ctx, v) => Math.cos(v[0](ctx))),
     C(MolScript.core.math.tan, (ctx, v) => Math.tan(v[0](ctx))),
-- 
GitLab