samskivert / pythagoras

A portable library of geometry classes for Java
Apache License 2.0
44 stars 14 forks source link

isPointInPolygon #12

Closed bootstraponline closed 12 years ago

bootstraponline commented 12 years ago

libgdx has isPointInPolygon and I didn't find a similar method in pythagoras. Is this something that should be in pythagoras?

samskivert commented 12 years ago

On Mon, Apr 30, 2012 at 2:43 PM, bootstraponline reply@reply.github.com wrote:

libgdx has isPointInPolygon and I didn't find a similar method in pythagoras. Is this something that should be in pythagoras?

Pythagoras has no Polygon class. It has a generalized Path which can be used to represent a polygon, and Path has Path.contains(x, y). Perhaps that suits your needs?

-- mdb@samskivert.com

bootstraponline commented 12 years ago

I think Path suits that use case. Thanks for the information.