UNPKG

@rayyamhk/matrix

Version:

A professional, comprehensive and high-performance library for you to manipulate matrices.

24 lines (21 loc) 457 B
"use strict"; /** * Generates a zero Matrix * @memberof Matrix * @static * @param {number} row - Number of rows of the Matrix * @param {number} col - Number of columns of the Matrix * @returns {Matrix} Zero Matrix */ function zero(row, col) { if (col === undefined) { return this.generate(row, row, function () { return 0; }); } return this.generate(row, col, function () { return 0; }); } ; module.exports = zero;