home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / FSGFX.ZIP / PTINRECT.C < prev    next >
C/C++ Source or Header  |  1990-03-07  |  219b  |  12 lines

  1. /* ptinrect.c */
  2. /* is the point in the rectangle? */
  3.  
  4. #include "mygraph.h"
  5.  
  6. int ptinrect(struct point pt,struct rect r)
  7. {
  8. return        pt.x >= r.pt1.x && pt.x < r.pt2.x    &&
  9.         pt.y >= r.pt1.y && pt.y < r.pt2.y;
  10. }
  11.  
  12.