61 if (rows.
Count <= 0 || rowsPerPage <= 0)
67 const int page =
WrapIndex(index / rowsPerPage + delta, pages);
68 const int start = page * rowsPerPage;
69 const int end = std::min(rows.
Count, start + rowsPerPage);
72 int landed = std::min(start + index % rowsPerPage, end - 1);
73 for (
int attempts = end - start; attempts > 0; --attempts)
79 landed = (landed + 1 < end) ? landed + 1 : start;