Find the index of the value and its fraction between neighboring points.
The grid class should have a floating point value and must have methods find
, front
, back
, and operator
[] .
The value must be bounded by the grid and less than the final value. The result will always have an index such that its neighbor to the right is a valid point on the grid, and the fraction between neghbors may be zero (in the case where the value is exactly on a grid point) but is always less than one. If the requested point is exactly on a coincident grid point, the lower point and a fraction of zero will result.