Answers for "check if point is left or right of vector"

C++
1

check if point is left or right of vector

Check position of point M(X, Y) relative to vector AB with points A(Ax, Ay) and B(Bx, By):

position = sign((Bx - Ax) * (Y - Ay) - (By - Ay) * (X - Ax))

M is: 	+1 left,
		-1 right,
    	0 on the vector AB
Posted by: Guest on October-27-2020

Code answers related to "check if point is left or right of vector"

Browse Popular Code Answers by Language