How to calculate opposite direction angle I searched but couldn't find on Google:

My question is, how do I find the opposite direction of an angle, for example 170 degree, how do I calculate the opposite direction in degrees?

Thanks in advance.
If you are given an angle $\alpha$, the oppossite angle would be $\alpha+180$. If you need to remain in $[0,360]$ then, you should take $(\alpha+180)\ mod\ 360$ (what in this case it is simply taking $\alpha-180$ if $\alpha+180\ge360$)
Considering an angle normallized between -180° and 180°, the opposite angle is given by :
if angle == 0 :
  opposite = 180 // or -180 as you wish
else :
  if angle &gt; 0 :
    opposite = angle - 180
  else :
    opposite = angle + 180