mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-18 14:59:29 +00:00
12 lines
293 B
JavaScript
12 lines
293 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Test whether a value is a Matrix
|
|
* @param {*} x
|
|
* @returns {boolean} returns true with input is a Matrix
|
|
* (like a DenseMatrix or SparseMatrix)
|
|
*/
|
|
module.exports = function isMatrix (x) {
|
|
return x && x.constructor.prototype.isMatrix || false;
|
|
};
|