Given circle centre: vectorA and another Vector on the circle\'s perimeter:vectorB, how can you determine the shorter route for vectorB to translate to another point on the circ
Just compute winding direction of triangle ABC
so if you compute normal n=(B-A)x(C-B)
where x
is cross product then n.z
sign determine the direction.
n.z = ((B.x-A.x)*(C.y-B.y)) - ((B.y-A.y)*(C.x-B.x))
if (n.z<0.0) dir=CW else dir=CCW;
that is all you need (CW means clockwise and CCW counter clockwise) of coarse if your coordinate system is different then the rotation can be negated
[Notes]
if (n.z==0)
then the points B,C
are either opposite or identical so direction does not matter because both ways the angular distance is the same