mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-12 16:27:51 +00:00
Fixed Rect.contains being off by 1
This commit is contained in:
1 parent
eb75a26c40
commit
e4169f7a5d
1 file changed
+1
-1
@@ -16,7 +16,7 @@ case class BaseRect[T: Numeric](x: T, y: T, w: T, h: T) {
|
||||
|
||||
def this(p: BasePoint[T], w: T, h: T) = this(p.x, p.y, w, h)
|
||||
|
||||
def contains(p: BasePoint[T]) = n.gteq(p.x, x) && n.gteq(p.y, y) && n.lteq(p.x, x2) && n.lteq(p.y, y2)
|
||||
def contains(p: BasePoint[T]) = n.gteq(p.x, x) && n.gteq(p.y, y) && n.lt(p.x, x2) && n.lt(p.y, y2)
|
||||
|
||||
def origin = BasePoint(x, y)
|
||||
|
||||
|
||||
Reference in new issue
Block a user