point in rectangle
Hi,
I was just wondering how I''d go about finding out if a 2 point is inside a 2d rectangle
cheers
Mark
Rectangle (x1, y1, x2, y2);userPoint = (x,y)if (x>=x1 && x<=x2) { if (y>=y1 && y<=y2) cout << "Point Is Inside rectangle";}
www.databyss.com
www.omlettesoft.com
"Don''t meddle in the affairs of wizards, for they are subtle and quick to anger."
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement