UNPKG

nerdamer-ts

Version:

javascript light-weight symbolic math expression evaluator

23 lines 802 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.max = void 0; const Utils_1 = require("../../../Core/Utils"); const Symbol_1 = require("../../../Types/Symbol"); const Settings_1 = require("../../../Settings"); const min_1 = require("./min"); /** * Returns maximum of a set of numbers * @returns {Symbol} */ function max() { let args = [].slice.call(arguments); if ((0, Utils_1.allSame)(args)) return args[0]; if ((0, Utils_1.allNumbers)(args)) return new Symbol_1.Symbol(Math.max.apply(null, args)); if (Settings_1.Settings.SYMBOLIC_MIN_MAX && (0, Utils_1.allConstants)(args)) return (0, min_1.symMinMax)('max', args); return (0, Symbol_1.symfunction)('max', args); } exports.max = max; //# sourceMappingURL=max.js.map