Added if function

This commit is contained in:
Thaum Rystra
2020-05-13 10:42:20 +02:00
parent 9069ee8e35
commit 97fcb76454
6 changed files with 19 additions and 9 deletions

9
app/imports/math.js Normal file
View File

@@ -0,0 +1,9 @@
import { create, all } from 'mathjs';
const math = create(all);
math.import({
'if': function(pred, a, b) {
return pred ? a : b;
}
});
export default math;