@nevware21/ts-utils

    Function mathPow

    The mathPow() function returns the base to the exponent power, that is, base^exponent.

    0.12.0

    The base number

    The exponent used to raise the base

    The result of raising the base to the exponent power (base^exponent)

    mathPow(2, 3); // 8
    mathPow(4, 0.5); // 2
    mathPow(7, 2); // 49
    mathPow(8, 1/3); // 2
    • Returns the value of a base expression taken to a specified power.

      Parameters

      • x: number

        The base value of the expression.

      • y: number

        The exponent value of the expression.

      Returns number

    MMNEPVFCICPMFPCPTTAAATR