Not sure if I understood what you're trying to do, but:
(x + 180) % 360 - 180
confused


POTATO-MAN saves the day! - Random