Error in e-maxx code?

Revision en1, by dreamplay, 2016-11-30 16:46:44

Given a polygon of n points in counter-clockwise order and then some queries, result of each query being either INSIDE(point is inside or on the boundary) or outside (point outside the boundary)
This is the code I refer to.
Input:
3
0 0
2 0
2 2

1 1

Output:
Outside

Expected Output:
Inside ( point is on boundary )
Am I missing something, or is there an error while handling the boundary case? Similar error is also commented in russian on the link.

Tags #geometry, computational geometry, #math, implementation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English dreamplay 2016-11-30 16:46:44 592 Initial revision (published)