@princedev/calculate
Version:
Fast, lightweight, and extinsible mathematical and statistical functions.
18 lines (17 loc) • 357 B
TypeScript
/**
* @name factorial
* @summary Returns the factorial of a number.
*
* @description Returns the factorial of a number.
*
* @example
* // Normal usage
* let result = factorial(4);
* // => 24
*
* @param {numberr} a numbers given.
* @returns {number}
*
* @function pure
*/
export default function factorial(a: number): number;