I am currently coding a program that draws a race track by combining multiple line segments that the user defines (which can be either a straight or a curve).
For my curve, I have the data for its radius, length and starting point. Using some maths explained here, I can also calculate the end point coordinates.
What would be a way to calculate the endpoint angle of the arc? It is important for me to know the end angle as the next line segment that connects with the arc will start with the same angle as the arc.
Edit
I am interested in finding the angle that a tangent intersecting the end point would make with the x axis.



