samskivert / pythagoras

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

AbstractRectangle.contains fix. #17

Closed aduros closed 11 years ago

aduros commented 11 years ago

Points on the top and left edges are considered contained, so should points on right and bottom. This also makes contains() consistent with outcode().

Maybe IShape.contains should document how points on edges are handled? AbstractCircle.contains is another one that doesn't consider edge points contained.

samskivert commented 11 years ago

I ended up making a new commit because we need changes to the f and d versions of AbstractRectangle.