There are two ways of doing this so that there is no lower bound. One is to do a second modulus after adding 360 to the results of the first modulus, the other uses whiles and is a little clearer. You can see this second variant in fixedwingpathfollower.c. 

I prefer this second kind because it works for both 360 and 2*pi-- err... sorry, @solidgoldbomb, 1*tau---, whereas the modulus (%) operation is mathematically defined for the integer set only. Thus both circular_modulus_deg and circular_modulus_rad look identical, except for the threshold values.