point in rectangle

Started by
0 comments, last by mwilson 23 years, 11 months ago
Hi, I was just wondering how I''d go about finding out if a 2 point is inside a 2d rectangle cheers Mark
Advertisement
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."
-40

This topic is closed to new replies.

Advertisement