mathjs: update to v4rc
This commit is contained in:
parent
6e9e2f1c48
commit
501bec6135
2 changed files with 22 additions and 13 deletions
|
|
@ -35,7 +35,7 @@
|
|||
"keyboardjs": "jean-emmanuel/KeyboardJS",
|
||||
"kiwi.js": "1.0.1",
|
||||
"licensify": "3.1.3",
|
||||
"mathjs": "3.20.2",
|
||||
"mathjs": "^4.0.0-rc.1",
|
||||
"minimatch": "^3.0.4",
|
||||
"nanomorph": "^5.1.3",
|
||||
"node-sass": "4.7.2",
|
||||
|
|
|
|||
|
|
@ -1,14 +1,3 @@
|
|||
var math = require('mathjs/dist/math.min.js').create({
|
||||
matrix: 'Array'
|
||||
})
|
||||
math.import({
|
||||
unpack: function(a) { return Array.isArray(a) ? a.toString() : a }
|
||||
})
|
||||
|
||||
// set math's parser array index base to zero
|
||||
math.expression.mathWithTransform = Object.assign({}, math)
|
||||
|
||||
|
||||
module.exports = {
|
||||
|
||||
clip: function(value,range) {
|
||||
|
|
@ -81,5 +70,25 @@ module.exports = {
|
|||
return hsb
|
||||
},
|
||||
|
||||
math: math
|
||||
math: (()=>{
|
||||
var math = require('mathjs/dist/math.min.js').create({
|
||||
matrix: 'Array'
|
||||
})
|
||||
math.import({
|
||||
unpack: function(a) { return Array.isArray(a) ? a.toString() : a },
|
||||
// basic relationnal to keep alphabetical string comparison (v4 change)
|
||||
equal: function (a, b) { return a == b },
|
||||
unequal: function (a, b) { return a != b },
|
||||
smaller: function (a, b) { return a < b },
|
||||
larger: function (a, b) { return a > b },
|
||||
smallerEq: function (a, b) { return a <= b },
|
||||
largerEq: function (a, b) { return a >= b }
|
||||
}, {override:true})
|
||||
|
||||
// set math's parser array index base to zero
|
||||
math.expression.mathWithTransform = Object.assign({}, math)
|
||||
|
||||
return math
|
||||
})()
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue