Added if function
This commit is contained in:
9
app/imports/math.js
Normal file
9
app/imports/math.js
Normal 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;
|
||||
Reference in New Issue
Block a user