UNPKG

2.48 kBSource Map (JSON)View Raw
1{"version":3,"file":"math-08e068f9.cjs","sources":["../math.js"],"sourcesContent":["/**\n * Common Math expressions.\n *\n * @module math\n */\n\nexport const floor = Math.floor\nexport const ceil = Math.ceil\nexport const abs = Math.abs\nexport const imul = Math.imul\nexport const round = Math.round\nexport const log10 = Math.log10\nexport const log2 = Math.log2\nexport const log = Math.log\nexport const sqrt = Math.sqrt\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The sum of a and b\n */\nexport const add = (a, b) => a + b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The smaller element of a and b\n */\nexport const min = (a, b) => a < b ? a : b\n\n/**\n * @function\n * @param {number} a\n * @param {number} b\n * @return {number} The bigger element of a and b\n */\nexport const max = (a, b) => a > b ? a : b\n\nexport const isNaN = Number.isNaN\n\nexport const pow = Math.pow\n/**\n * Base 10 exponential function. Returns the value of 10 raised to the power of pow.\n *\n * @param {number} exp\n * @return {number}\n */\nexport const exp10 = exp => Math.pow(10, exp)\n\nexport const sign = Math.sign\n\n/**\n * @param {number} n\n * @return {boolean} Wether n is negative. This function also differentiates between -0 and +0\n */\nexport const isNegativeZero = n => n !== 0 ? n < 0 : 1 / n < 0\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACY,MAAC,KAAK,GAAG,IAAI,CAAC,MAAK;AACnB,MAAC,IAAI,GAAG,IAAI,CAAC,KAAI;AACjB,MAAC,GAAG,GAAG,IAAI,CAAC,IAAG;AACf,MAAC,IAAI,GAAG,IAAI,CAAC,KAAI;AACjB,MAAC,KAAK,GAAG,IAAI,CAAC,MAAK;AACnB,MAAC,KAAK,GAAG,IAAI,CAAC,MAAK;AACnB,MAAC,IAAI,GAAG,IAAI,CAAC,KAAI;AACjB,MAAC,GAAG,GAAG,IAAI,CAAC,IAAG;AACf,MAAC,IAAI,GAAG,IAAI,CAAC,KAAI;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACY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