mathjs
Version:
Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser and offers an integrated solution to work with numbers, big numbers, complex numbers, units, and matrices.
21 lines (18 loc) • 393 B
JavaScript
module.exports = function (math) {
var util = require('../../util/index'),
object = util.object;
/**
* Clone an object
*
* clone(x)
*
* @param {*} x
* @return {*} clone
*/
math.clone = function clone (x) {
if (arguments.length != 1) {
throw new math.error.ArgumentsError('clone', arguments.length, 1);
}
return object.clone(x);
};
};