Interpolate on a cylic x axes
Find the fixed point $(x_l,y_l)$ just to the left of your $x$-value, and the fixed point $(x_r,y_r)$ just to the right of your $x$-value.  Then use the line between those two fixed points to interpolate.

To find the fixed point to the left and the fixed point to the right, store the fixed points in sorted order (sorted by their $x$-coordinate).  Then you can use binary search to find the fixed point to the left and to the right.

To deal with wrap-around, take the left-most fixed point and add a wrapped-around copy above the upper limit, and similarly add a copy of the right-most fixed point.  For instance, suppose the limit is 0..100, and the left-most fixed point is $(5,20)$ and the right-most fixed point is $(98,3)$.  Then you should add the two additional points $(105,20)$ and $(-2,3)$.  Now apply the algorithm above.