UNPKG

@princedev/calculate

Version:

Fast, lightweight, and extinsible mathematical and statistical functions.

18 lines (17 loc) 429 B
/** * @name power * @summary Returns the power. * * @description Returns the power of given base (left most) raise to its succeeding numbers. * * @example * // Normal usage * let result = power(2,5,2); // the same as ((2)^5)^2 * // => 1024 * * @param {Array<number>} args given numbers. * @returns {number} the power * * @function pure */ export default function power(...args: number[]): number;