Whether the point lies inside rect.
- rect: the rectangle. Its left and top edges count as inside, its right and bottom edges do not.
- x: the point's horizontal position.
- y: the point's vertical position.
r := Rect.{ 0, 0, 10, 10 };
assert(contains(r, 0, 0));
assert(!contains(r, 10, 10));contains :: (rect: Rect, x: float, y: float) -> bool
Whether the point lies inside rect.
Parameters
- rect: Rect
- the rectangle. Its left and top edges count as inside, its right and bottom edges do not.
- x: float
- the point's horizontal position.
- y: float
- the point's vertical position.
Returns
- bool
r := Rect.{ 0, 0, 10, 10 };
assert(contains(r, 0, 0));
assert(!contains(r, 10, 10));