-
Notifications
You must be signed in to change notification settings - Fork 33
Polygon.contains? bug #7
Copy link
Copy link
Open
Description
arr = [Geometry::Point.new(1.6, 1.0), Geometry::Point.new(1.6, 2.0),
Geometry::Point.new(1.2, 2.0), Geometry::Point.new(1.2, 1.0)]
point = Geometry::Point.new(1.5, 1.5)
result = Geometry::Polygon.new(arr).contains?(point)
Result = true. It's ok. But:
arr = [Geometry::Point.new(1.6, 1.0), Geometry::Point.new(1.6, 2.0),
Geometry::Point.new(1.2, 2.0), Geometry::Point.new(1.2, 1.0)]
point = Geometry::Point.new(1.5, 1.5)
result = Geometry::Polygon.new(arr).contains?(point)
(0..100).each{result &&= Geometry::Polygon.new(arr).contains?(point)}
result = false
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels