How to test if a point is inside of a convex polygon in 2D integer coordinates?
If it is convex, a trivial way to check it is that the point is laying on the same side of all the segments (if traversed in the same order). You can check that easily with the dot product (as it is proportional to the cosine of the angle formed between the segment and the … Read more