I'm using while in this fashion:
while (value < -180 || value > 180) {
if (value < -180) {
value += 360
}
if (value > 180) {
value -= 360
}
}
I would like, though, to use a recursive function instead of while. I searched on Google but couldn't find anything. So I thought maybe I could get the answer here.