I'm trying to solve positions of the planets as described in this paper.
Step 3 of the computation starts with "Modulus the mean anomaly so that $-180^o \lt M \lt +180^o$." I understand what that means (we're constraining M to be from $-180^o$ to $180^o$), but the exact mathematical operations to perform here elude me.
This is an easy problem if the output range is zero to positive whatever, but given the low end of the range is a negative number, I'm thrown for a loop. Can anyone bail me out here please?