findInterpolationValuesFromAllValidTimes

fun findInterpolationValuesFromAllValidTimes(targetValue: Long, sortedList: List<Long>): InterpolationResult?

Finds the two values in a sorted list that a target value falls between, and calculates the fractional distance between them.

Return

An InterpolationResult containing the lower and upper bound values and the fraction (0.0f to 1.0f). Returns null if the list has fewer than two elements or the target is outside the list's range.

Parameters

targetValue

The long value to locate within the list.

sortedList

The sorted list of longs to search within.