Runaway
2012-06-12 01:54:33
I don't know if there is already a function for this since I'm not on my computer, so I figured I'd just write it up real quick. If it is, then my bad :S
Err, now that I've typed it out it really doesn't look that useful. It definitely simplifies the process though.
function InBox(P: TPoint, Box: TBox): Boolean;
begin
Result := False;
if (P.x > Box.x1) and (P.x < Box.x2) and (P.y > Box.y1) and (P.y < Box.y2) then
Result := True;
end;
Err, now that I've typed it out it really doesn't look that useful. It definitely simplifies the process though.