windmove-constrain-around-range

windmove-constrain-around-range is a compiled Lisp function in `windmove.el'.

(windmove-constrain-around-range N MIN-N MAX-N)

Ensure that N is between MIN-N and MAX-N inclusive by wrapping.
If N is less than MIN-N, return MAX-N; if greater than MAX-N, return
MIN-N.