c# - Calculating direction of rotation -


if have 4 points in 2d space, rotated m degrees, best/ efficient way determine direction(clockwise/counter clockwise) of rotation.

i know point before , after rotation.

i have tried taking account lowest point , highest point (based on y value) , comparing x difference e.g. (+ve or -ve) not seem reliable , doubt efficient solution.

any point if have both before , after coordinates. take cross product of before after. sign of resultant vector tell clockwise (-) or counterclockwise(+).


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -