How to verify if a point lies between 2 vectors?

Started by
2 comments, last by Boder 16 years, 2 months ago
How do you verify if a point lies between 2 vectors? If I have 2 2d vectors and a 2d point, how can I know that the point lies between the 2 vectors like in a radar view system? Thanks in advance!
Advertisement
Could you just get the angles for the three vectors (treating point as a vector), and see that the one lies between the other two. Also making sure the distance from the origin is less than the length of the other vectors if need be.
2 dot products. For the left vector use the right hand normal and for the right vector use the left hand normal. Take the vector of 2D point - center of the radar. Perform the dot product (v1.x*v2.x+v1.y*v2.y) and if it's > 0 for both then it's between the vectors. Research it and test it out on paper.
I was going to suggest that, but doesn't that assume the rader forms a π/2 angle?

This topic is closed to new replies.

Advertisement