Modified angle update to switch instead of else-if