(From aduros) AbstractRectangle.contains should contain bounds.

Points on the top and left edges are considered contained, so should points on
right and bottom. This also makes contains() consistent with outcode().
This commit is contained in:
Michael Bayne
2012-11-28 16:29:44 -08:00
parent 90e0c58c84
commit 8cece6137b
2 changed files with 2 additions and 2 deletions
@@ -108,7 +108,7 @@ public abstract class AbstractRectangle extends RectangularShape implements IRec
px -= x; px -= x;
py -= y; py -= y;
return px < width() && py < height(); return px <= width() && py <= height();
} }
@Override // from interface IShape @Override // from interface IShape
@@ -108,7 +108,7 @@ public abstract class AbstractRectangle extends RectangularShape implements IRec
px -= x; px -= x;
py -= y; py -= y;
return px < width() && py < height(); return px <= width() && py <= height();
} }
@Override // from interface IShape @Override // from interface IShape