numbers / numbers.js

Advanced Mathematics Library for Node.js and JavaScript
Apache License 2.0
1.77k stars 167 forks source link

in-place operations occur in matrix.js #140

Closed Dakkers closed 9 years ago

Dakkers commented 9 years ago

e.g.

n = require('numbers')
var m1 = [[1,2,3],[4,5,6],[7,8,9]];
var m2 = n.matrix.scalar(m1, 10);

this function alters m1 as well.

I think it would be good to have an option for having both in-place operations and ... not in-place. Julia (http://julialang.org) uses the ! character to represent in-place operations, but we are not so lucky to have no access to this character. any suggestions?