UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

10 lines 392 B
/** * Compute factorial of X (X!) * Note that factorial of 13 is already 6,227,020,800 which exceeds 32bit integer limit * Note that this implementation is intended for small inputs only * @example factorial(5) == 5 * 4 * 3 * 2 * 1 == 120 * @param {number} x must be an integer * @return {number} */ export function factorial(x: number): number; //# sourceMappingURL=factorial.d.ts.map