give the outline of an efficient algorithm to test if a point is inside a rectangle.
Given the point's co-ordinates x,y
If (x >= Xa) and (x <= Xb)
and if (y >= Ya) and (y <= Yb) then point x,y is inside the rectangle,
where the co-ordinates of the four points are Xa,Ya ; Xa,Yb ; Xb,Ya ; Xb,Yb.
Or , more concisely Xa <= x >= Xb and Ya <= y >= Yb
I think that works ,as long as you are given the points and rectangles co-ordinates.
[ August 25, 2003: Message edited by: HS Thomas ]