UNPKG

@princedev/calculate

Version:

Fast, lightweight, and extinsible mathematical and statistical functions.

22 lines (21 loc) 498 B
/** * @name remainder * @summary Returns the remainder. * * @description Divides given numbers from left to right and gets its remainder. * * @example * // Normal usage * let result = remainder(8,4,2); * // => 0 * * // Using an array * let result = remainder(...[8,4,2]); * // => 0 * * @param {Array<number>} args numbers given. * @returns {number} the resulting remainder. * * @function pure */ export default function remainder(...args: number[]): number;