All Manuals > CAPI User Guide and Reference Manual > 22 GRAPHICS-PORTS Reference Entries

inside-rectangle Function

Summary

Determines if a point lies inside a rectangle.

Package

graphics-ports

Signature

inside-rectangle rectangle x y => result

Arguments
rectangle
A list of integers.
An integer.
An integer.
Values
result
A boolean.
Description

The function inside-rectangle returns t if the point (x y) is inside rectangle.

rectangle is expected to be ordered; if rectangle is specified by (left top right bottom), then left must be less than right, and top must be less than bottom. The lines y = bottom and x = right are not considered to be inside the rectangle.


CAPI User Guide and Reference Manual (Macintosh version) - 01 Dec 2021 19:31:44