Get a point by a given point, degree and distance I have a point $(x_1, y_1)$, an angle $A$ and a distance $D$

How do I get the point $(x, y)$ which is $D$ unit away from $x_1, y_1$ with angle $A$.



In the right image, the answer will be $(x_1 - D\sin A, y_1 + D\sin A)$

And in the left one $(x_1 + D\sin (180-A), y1 + D\sin(180-A))$

Is there some kind of formula that could cover all cases $(A&lt;90, 90&lt;A&lt;180, 180&lt;A&lt;270, 270&lt;A&lt;360$?
The solution is $(x_1-D\cos A, y_1+D\sin A)$ for all angles $A$
The solution is $(x_1-D\cos A, y_1+D\sin A)$ for all angles $A$