Function percent

Calculates the percentage of a value between two other values.

  • Parameters

    • val: number

      The value to calculate the percentage for.

    • a: number

      The lower bound.

    • b: number

      The upper bound.

    Returns number

    The percentage of the value between the bounds.