Feb-17-2020, 01:21 AM
Two points does not determine a rectangle, so take the simple case. One line will go from x1,y1 to x2, y1, next x1,y1 to x1, y2, etc.
A point will be within the rectangle if the X value is between x1 and x2 AND the Y value is between y1 and y2.
Done.
A point will be within the rectangle if the X value is between x1 and x2 AND the Y value is between y1 and y2.
Done.