• Returns the proportional mapping of a number from one range to another.

    Parameters

    • num: number

      Number

    • range1: number[]

      First range

    • range2: number[]

      Second range

    Returns number

    Example

    // Returns 0.92
    const map = Chalkboard.numb.map(23, [0, 25], [0, 1]);

Generated using TypeDoc