findNearestPointsInArray Module Function

pure module function findNearestPointsInArray(array, point) result(pair)

Finds indices of two of the values nearest to a point in a monotonic array

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:) :: array
real(kind=rk), intent(in) :: point

Return Value integer(kind=ik), dimension(2)