Added back MathjsWrapper, which I accidentally lost

This commit is contained in:
Ozzie Gooen 2020-07-02 18:29:04 +01:00
parent 41eca03618
commit 9f30b6d75c
2 changed files with 12 additions and 3 deletions

View File

@ -0,0 +1,9 @@
const math = require("mathjs");
function parseMath(f) {
return JSON.parse(JSON.stringify(math.parse(f)))
};
module.exports = {
parseMath,
};

View File

@ -58,9 +58,9 @@ module Scale = {
let format = (operation: t, value, scaleBy) =>
switch (operation) {
| `Multiply => {j|scaleMultiply($value, $scaleBy) |j}
| `Exponentiate => {j|ScaleExponentiate($value, $scaleBy) |j}
| `Log => {j|ScaleLog($value, $scaleBy) |j}
| `Multiply => {j|verticalMultiply($value, $scaleBy) |j}
| `Exponentiate => {j|verticalExponentiate($value, $scaleBy) |j}
| `Log => {j|verticalLog($value, $scaleBy) |j}
};
let toKnownIntegralSumFn =