windmove-wrap-loc-for-movement

windmove-wrap-loc-for-movement is a compiled Lisp function in `windmove.el'.

(windmove-wrap-loc-for-movement COORD WINDOW)

Takes the constrained COORD and wraps it around for the movement.
This makes an out-of-range x or y coordinate and wraps it around the
frame, giving a coordinate (hopefully) in the window on the other edge
of the frame. WINDOW is the window that movement is relative to (nil
means the currently selected window). Returns the wrapped coordinate.