Take three different sample points A, B, C visited by your mouse. Compute the vectors AB = v1 (v1x, v1y) , AC = v2 (v2x, v2y). Sign of v2x* v1y - v1x * v2y will tell you the result: positive = clockwise. 0 = aligned visited points negative ... Regards