Skip to content
Snippets Groups Projects
Commit 5b826410 authored by Alexander Rose's avatar Alexander Rose
Browse files

add sign to core.math in mol-script

parent de2f0c27
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,9 @@ Note that since we don't clearly distinguish between a public and private interf
- Support `ignoreHydrogens` in interactions representation
- Add hydroxyproline (HYP) commonly present in collagen molecules to the list of amino acids
- Fix assemblies for Archive PDB files (do not generate unique `label_asym_id` if `REMARK 350` is present)
- Add `cantorPairing`, `sortedCantorPairing`, `invertCantorPairing`, `trunc` to `core.math` in `mol-script`
- Add additional functions to `core.math` in `mol-script`
- `cantorPairing`, `sortedCantorPairing`, `invertCantorPairing`,
- `trunc`, `sign`
## [v3.34.0] - 2023-04-16
......
......@@ -121,6 +121,7 @@ const math = {
roundInt: unaryOp(Type.Num),
trunc: unaryOp(Type.Num),
abs: unaryOp(Type.Num),
sign: unaryOp(Type.Num),
sqrt: unaryOp(Type.Num),
cbrt: unaryOp(Type.Num),
sin: unaryOp(Type.Num),
......
......@@ -127,6 +127,7 @@ const symbols = [
C(MolScript.core.math.roundInt, (ctx, v) => Math.round(v[0](ctx))),
C(MolScript.core.math.trunc, (ctx, v) => Math.trunc(v[0](ctx))),
C(MolScript.core.math.abs, (ctx, v) => Math.abs(v[0](ctx))),
C(MolScript.core.math.sign, (ctx, v) => Math.sign(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))),
......
......@@ -62,6 +62,7 @@ export const SymbolTable = [
Alias(MolScript.core.math.roundInt, 'round'),
Alias(MolScript.core.math.trunc, 'trunc'),
Alias(MolScript.core.math.abs, 'abs'),
Alias(MolScript.core.math.sign, 'sign'),
Alias(MolScript.core.math.sqrt, 'sqrt'),
Alias(MolScript.core.math.cbrt, 'cbrt'),
Alias(MolScript.core.math.sin, 'sin'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment