math: clean definition and set array index base to ZERO
This commit is contained in:
parent
85aa663c63
commit
0381e0aade
1 changed files with 6 additions and 3 deletions
|
|
@ -1,5 +1,3 @@
|
|||
var math = require('mathjs')
|
||||
|
||||
module.exports = {
|
||||
|
||||
clip: function(value,range) {
|
||||
|
|
@ -72,5 +70,10 @@ module.exports = {
|
|||
return hsb
|
||||
},
|
||||
|
||||
math: math
|
||||
math: function(){
|
||||
var math = require('mathjs')
|
||||
// set math's parser array index base to zero
|
||||
math.expression.transform = Object.create(math)
|
||||
return math
|
||||
}()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue