Function findClosest

  • find the item in a given array that has the difficulty closest to the target value

    Parameters

    • arr: Stimulus[]

      Array - an array of stimuli sorted by difficulty

    • target: number

      number - ability estimate

    Returns number

    the index of arr

    Remarks

    The input array of stimuli must be sorted by difficulty.

Generated using TypeDoc