blob: 33480756a6b538c110f42e0a5420be040f2e7664 (
plain)
1
2
3
4
5
6
7
8
|
(define (is-point-inside-rect? point rect)
(cond ((not (point? point)) #f)
((not (rect? rect)) #f)
(else (and (>= (point-x point) (rect-x rect))
(>= (point-y point) (rect-y rect))
(<= (point-x point) (+ (rect-x rect) (rect-width rect)))
(<= (point-y point) (+ (rect-y rect) (rect-height rect))))
)))
|