Interesting decision based on cross product of two vectors. How do one decide the direction?

Revision en1, by ganesh_6, 2022-03-20 11:03:25

I was solving the question http://mirror.codeforces.com/contest/227/problem/A. If the cross product is zero then obviously they are collinear since sin(x)=0 if x=2*n*PI. However, how do they decide if it is Left or Right based on the value of cross-product i.e; x1*y2-x2*y1. Please demystify this for me. Am I missing any fundamentals?

C++
Tags geometry

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ganesh_6 2022-03-20 12:59:03 80
en1 English ganesh_6 2022-03-20 11:03:25 936 Initial revision (published)