You will need at least three ordered items to determine if someone is moving clockwise or counterclockwise over time. Having only two points, it is unclear (for example) someone turned 90 degrees or -270 degrees. Thus, a simple cross product of the beginning and the end will not work.
Try to select the mouse while dragging to get the additional information you need, and then take incremental cross-products between each pair of consecutive points. This will tell you what you want to know. However, you will need to try fast enough so that there is no turning more than 180 degrees; otherwise, you will again encounter an ambiguous situation.
source
share