I have 2 images which user selects matching points on both images I calculate the rotation angle needed, to align the images
The rotation angle id defined in this coordinate system
-90
-180 | 0
---------
180 | 0
90
My graphics view is defined by this coordinate system
270
180--|--0
90
The rotation angle is correct How do I determine which way to rotate?
Example if X & Y are points on images The rotation angle is -110 either way defined by the coordinate system
x |
|
-------y-
|
|
How do I create an if statement to determine which way to rotate
note: if rotation angle is between -90 & 90 then by applying the rotation by the original value WORKS, But if the value is not between those value it does not rotate properly
From example above if I'm rotating x -> y (x needs to rotate positive) but if y -> x (y needs to rotate negative) BUT the original value is -110 either way so I'm guessing I can't use the rotation angle as a parameter to determine which way to rotate
It think it is simple but for some reason I can't get my head around it