function testRectPoint(rect, point) {
  if (rectHasNoSize(rect)) {
    return false;
  }

  return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
}
/**
 * Test if a Rectangle contains a Point. If so, returns true and false otherwise.
 * Rectangle must have a width and height greather then 0.
 * @private
 * @param {object} rect
 * @param {number} rect.x - x-coordinate
 * @param {number} rect.y - y-coordinate
 * @param {number} rect.width - width
 * @param {number} rect.height - height
 * @param {object} point
 * @param {number} point.x - x-coordinate
 * @param {number} point.y - y-coordinate
 * @return {boolean} true if rectangle contains point
 */
Test if a Rectangle contains a Point. If so, returns true and false otherwise.
Rectangle must have a width and height greather then 0.
Test if a Rectangle contains a Point . If so returns true and false otherwise . Rectangle must have a width and height greather then 0 .
function testRectPoint(rect, point) {
  if (rectHasNoSize(rect)) {
    return false;
  }
  return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
}
function testRectPoint ( rect , point ) { if ( rectHasNoSize ( rect ) ) { return false ; } return point . x >= rect . x && point . x <= rect . x + rect . width && point . y >= rect . y && point . y <= rect . y + rect . height ; }
Test if a Rectangle contains a Point.
Test if a Rectangle contains a Point .