Calculating direction of rotation
If I have four points in 2D space, which are then rotated m degrees, what is the best/ most efficient way to determine the direction(clockwise/counter开发者_开发问答 clockwise) of the rotation.
I know which point is which before and after rotation.
I have tried taking into account the lowest point and the highest point (based on y value) and comparing the x difference e.g. (+ve or -ve) but this does not seem to be very reliable and I doubt it is an efficient solution.
Any point will do if you have both the before and after coordinates. Take the cross product of the before into the after. The sign of the resultant vector will tell you clockwise (-) or counterclockwise(+).
do you know which point is which? if you do, using one of them is enough
精彩评论