ianhi_processing/NatureOfCode/The-Nature-of-Code-Examples-master/Processing/chp9_ga/NOC_9_04_Faces_interactiveselection/Rectangle.pde
// The Nature of Code
// Daniel Shiffman
// http://natureofcode.com

// Re-implementing java.awt.Rectangle
// so JS mode works

class Rectangle {
   int x;
   int y;
   int width;
   int height;
   
   Rectangle(int x_, int y_, int w, int h) {
     x = x_;
     y = y_;
     width = w;
     height = h;
   }
   
   boolean contains(int px, int py) {
     return (px > x && px < x + width  && py > y && py < y + height);
   }
   
}
