Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Polygon.contains? bug #7

xsxVeNxsx opened this Issue · 1 comment

2 participants

arr = [, 1.0),, 2.0),, 2.0),, 1.0)]
point =, 1.5)
result =

Result = true. It's ok. But:

arr = [, 1.0),, 2.0),, 2.0),, 1.0)]
point =, 1.5)
result =
(0..100).each{result &&=}

result = false


Thanks for reporting a very interesting bug. I'll investigate what's happening there.

@xsxVeNxsx xsxVeNxsx referenced this issue from a commit in horror/d2d-shooter_game
@xsxVeNxsx xsxVeNxsx Change polygon_include_point function
ruby-geometry is issued uncorrect results with some data. Details on DanielVartanov/ruby-geometry#7
That's why a new implementation has been developed, without using third-party gems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.