Function calculatePercentage

  • Calculates the percentage of a partial value compared to a whole value.

    Parameters

    • partial: number

      The partial value.

    • whole: number

      The whole value.

    Returns number

    The percentage value.

    Throws

    Error if either partial or whole is not a number, or if whole is zero.

Generated using TypeDoc