How can I draw an arrowed line between two circles, given:
I am using
If I understood correctly, you need to find the 2D vector that you need to add to the source to get to the border of the target circle.
Pseudo code:
d = distance between A and B; // (sqrt((xB-xA)² + (yB-yA)²)).
d2 = d - radius;
ratio = d2 / d;
dx = (xB - xA) * ratio;
dy = (yB - yA) * ratio;
x = xA + dx;
y = yA + dy;