set_visible_range Subroutine

private subroutine set_visible_range()

Set visible range ivis0..ivis1 from view.

First and last model strips overlapping [st%xmin, st%xmax]; xedge increases for both x quantities, so bisection finds strip at each window edge.

Arguments

None

Source Code

   subroutine set_visible_range()
      !! Set visible range `ivis0`..`ivis1` from view.
      !!
      !! First and last model strips overlapping [st%xmin, st%xmax]; `xedge` increases for both x
      !! quantities, so bisection finds strip at each window edge.
      ivis0 = max(1_int32, min(nmodels, bisect_le(xedge, st%xmin)))
      ivis1 = max(ivis0, min(nmodels, bisect_le(xedge, st%xmax)))
   end subroutine set_visible_range