findNearestValue

fun findNearestValue(list: List<Offset>, intersectionPoint: Float): Offset

Used to find the closest value for a given input

Parameters

list

: list of offsets

intersectionPoint

: point on xAxis