mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-08-11 11:14:04 +02:00
finally explained how to lower the curve order
This commit is contained in:
13
lib/matrix-multiply.js
Normal file
13
lib/matrix-multiply.js
Normal file
@@ -0,0 +1,13 @@
|
||||
var transpose = require('./matrix-transpose.js');
|
||||
|
||||
module.exports = function multiply(m1, m2) {
|
||||
var M = [];
|
||||
var m2t = transpose(m2);
|
||||
m1.forEach( (row, r) => {
|
||||
M[r] = [];
|
||||
m2t.forEach( (col, c) => {
|
||||
M[r][c] = row.map( (v,i) => col[i] * v).reduce( (a,v) => a+v, 0 );
|
||||
});
|
||||
});
|
||||
return M;
|
||||
};
|
Reference in New Issue
Block a user