Change in fast 3d interpolation

Flip the edge vector if its values are decreasing. So they can be used
in the histc function.