Given the image below, I am trying to find the degrees I need to rotate the curve itself, to get A (x1, y1) to point B (x2, y2). I need this rotation to animate a circle along a path for the web (writing the animations in code).
You must know the centerpoint of the circle. Otherwise there's infinite number of possible circles common for A and B.
Think the points as complex numbers A=x1+iY1, B=x2+iY2. In the same way let the centerpoint of the circle be C=x3+iy3
radius B-C = (A-C)exp(iD) where D=the needed rotation from A to B in radians. Thus you calculate (B-C)/(A-C), convert the result to polar form and get the needed angle as the angle of the polar presentation. The result is seen as CCW direction.
No actual division is needed. As well you convert A-C and B-C both to polar form and subtract the angles to get the difference.