UNPKG

@princedev/calculate

Version:

Fast, lightweight, and extinsible mathematical and statistical functions.

21 lines (20 loc) 487 B
/** * @name range * @summary Returns the range * * @description Returns the difference of the highest and lowest number in the given numbers * * @example * // Normal usage * let result = range(10,20,30); * // => 20 * // Using an array * let result = range(...[10,20,30]); * // => 20 * * @param {Array<number>} args given numbers * @returns {number} the resulting range * * @function pure */ export default function range(...args: number[]): number;