relative negative radian bearings to cartesian coordinates

154 Views Asked by At

I have Python code to go from polar to Cartesian if the angles are all positive from 0 to 2 pi.

x = distance * np.cos(angle)
y = distance * np.sin(angle)

So given a certain bearing in radians, that would go where angle is and the distance in that direction is distance. But how do I deal with bearings given to me in negative radians?