When you get the hang of vector math it's always the same thing
cos(a) gives you an X projection of the unit vector at angle a
sin(a) gives you an Y projection ot the unit vector at angle a
Just have to scale a unit vector by the magnitude (distance) you want it to be and you're done.
(vector and position are almost the same thing... they share common notation)