Logo

Programming-Idioms

History of Idiom 178 > diff from v1 to v2

Edit summary for version 2 by Bart:
[Pascal] Lowercase the identifiers
ā†·

Version 1

2019-01-08, 17:25:07

Version 2

2019-01-08, 17:34:02

Idiom #178 Check if point is inside rectangle

Set boolean b to true if if the point with coƶrdinates (x,y) is inside the rectangle with coƶrdinates (x1,y1,x2,y2) , or to false otherwise.
Describe if the edges are considered to be inside the rectangle.

Idiom #178 Check if point is inside rectangle

Set boolean b to true if if the point with coƶrdinates (x,y) is inside the rectangle with coƶrdinates (x1,y1,x2,y2) , or to false otherwise.
Describe if the edges are considered to be inside the rectangle.

Imports
Types
Imports
Types
Code
B := PtInRect(Rect(X1,Y1,X2,Y2), Point(X,Y));
Code
b := PtInRect(Rect(x1,y1,x2,y2), Point(x,y));
Comments bubble
The bottom and right edges are not considered part of the rectangle, the left and top are.
Comments bubble
The bottom and right edges are not considered part of the rectangle, the left and top are.