Check if a point is inside specified bounds
@param x
@param y
@param bounds
@returns {boolean}
545183
function pointIsInsideBounds(x, y, bounds) {
        return x >= bounds.left &&
            y >= bounds.top &&
            x <= bounds.left + bounds.width &&
            y <= bounds.top + bounds.height;
    }
1151258
function isInRange(node, location) {
    return node && node.range[0] <= location && location <= node.range[1];
}
1088176
def contains_point?(point)
      return false unless inside_bounding_box?(point)
      c = false
      i = -1
      j = size - 1
      while (i += 1) < size
        if (self[i].y <= point.y && point.y < self[j].y) ||
           (self[j].y <= point.y && point.y < self[i].y)
          if point.x < (self[j].x - self[i].x) * (point.y - self[i].y) / (self[j].y - self[i].y) + self[i].x
            c = !c
          end
        end
        j = i
      end
      c
    end
1156714
function closedPolygon(coordinates) {
    var outer = [ ];

    for (var i = 0; i < coordinates.length; i++) {
      var inner = coordinates[i].slice();
      if (pointsEqual(inner[0], inner[inner.length - 1]) === false) {
        inner.push(inner[0]);
      }

      outer.push(inner);
    }

    return outer;
  }
535889
public void restrict(float x, float y, float extraX, float extraY, PointF out) {
        tmpPointArr[0] = x;
        tmpPointArr[1] = y;

        if (boundsRotation != 0f) {
            // Rotating given point so we can apply rectangular bounds.
            tmpMatrix.setRotate(-boundsRotation, boundsPivotX, boundsPivotY);
            tmpMatrix.mapPoints(tmpPointArr);
        }

        // Applying restrictions
        tmpPointArr[0] = MathUtils.restrict(tmpPointArr[0],
                bounds.left - extraX, bounds.right + extraX);
        tmpPointArr[1] = MathUtils.restrict(tmpPointArr[1],
                bounds.top - extraY, bounds.bottom + extraY);

        if (boundsRotation != 0f) {
            // Rotating restricted point back to original coordinates
            tmpMatrix.setRotate(boundsRotation, boundsPivotX, boundsPivotY);
            tmpMatrix.mapPoints(tmpPointArr);
        }

        out.set(tmpPointArr[0], tmpPointArr[1]);
    }
1242589
@Pure
	boolean containsControlPoint(Point3D p) {
		double x, y, z;
		for(int i=0; i<this.numCoords;) {
			x = this.coords[i++];
			y = this.coords[i++];
			z = this.coords[i++];
			if (x==p.getX() && y==p.getY() && z==p.getZ()) {
				return true;
			}
		}
		return false;
	}
677036
function(bounds) {
            var canvas = this.getCanvas();
            
            if (bounds) {
                this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);
            }
            else {
                this.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());
            }
        }
1924
public void getBounds(Rect bounds) {
        final int outerX = (int) mTargetX;
        final int outerY = (int) mTargetY;
        final int r = (int) mTargetRadius + 1;
        bounds.set(outerX - r, outerY - r, outerX + r, outerY + r);
    }
722005
@Pure
	private static boolean isOutsideNodeBuildingBounds(AbstractGISTreeSetNode<?, ?> node,
			Rectangle2afp<?, ?, ?, ?, ?, ?> location) {
		final Rectangle2d b2 = getNormalizedNodeBuildingBounds(node, location);
		if (b2 == null) {
			return false;
		}
		return Rectangle2afp.classifiesRectangleRectangle(
				b2.getMinX(), b2.getMinY(), b2.getMaxX(), b2.getMaxY(),
				location.getMinX(), location.getMinY(), location.getMaxX(), location.getMaxY()) != IntersectionType.INSIDE;
	}
488034
function insidePoint(element, x, y) {
        let offset = element.offset();
        if (x < offset.left || offset.left + element.outerWidth(true) < x)
          return false;
        if (y < offset.top || offset.top + element.outerHeight(true) < y)
          return false;
        return true;
      }
956234
public static boolean isPointInsideView(float x, float y, View view) {
        int location[] = new int[2];
        view.getLocationOnScreen(location);
        int viewX = location[0];
        int viewY = location[1];

        //point is inside view bounds
        if ((viewX < x && x < (viewX + view.getWidth())) &&
                (viewY < y && y < (viewY + view.getHeight()))) {
            return true;
        } else {
            return false;
        }
    }
2544
public boolean containsPoint(INDArray point) {
        double first = point.getDouble(0), second = point.getDouble(1);
        return x - hw <= first && x + hw >= first && y - hh <= second && y + hh >= second;
    }
1129649
def inbounds(self, min, max):
        
        mincheck = sum(self.coordinates >= min, axis=1) == 0
        maxcheck = sum(self.coordinates < max, axis=1) == 0
        return True if (mincheck.sum() + maxcheck.sum()) == 0 else False
793320
@javax.annotation.Nonnull
  public Bounds getBounds(@javax.annotation.Nonnull double[][] points) {
    int dim = points[0].length;
    double[] max = IntStream.range(0, dim).mapToDouble(d -> {
      return Arrays.stream(points).mapToDouble(pt -> pt[d]).filter(x -> Double.isFinite(x)).max().orElse(Double.NaN);
    }).toArray();
    double[] min = IntStream.range(0, dim).mapToDouble(d -> {
      return Arrays.stream(points).mapToDouble(pt -> pt[d]).filter(x -> Double.isFinite(x)).min().orElse(Double.NaN);
    }).toArray();
    return new Bounds(max, min);
  }
1270653
public boolean pointInBounds(Point loc) {
        return loc.x >= 0 && loc.x < this.columns && loc.y >= 0 && loc.y < this.rows;
    }
82080
public static boolean isPointInBoundingBox(Point point,
			BoundingBox boundingBox, double maxLongitude) {
		BoundingBox pointBoundingbox = new BoundingBox(point.getX(),
				point.getY(), point.getX(), point.getY());
		BoundingBox overlap = overlap(boundingBox, pointBoundingbox,
				maxLongitude, true);
		return overlap != null;
	}
1120850
function calcMinimumBounds(lines) {
    var bounds = {  x:  Number.MAX_VALUE, y:  Number.MAX_VALUE,  x2: Number.MIN_VALUE, y2: Number.MIN_VALUE }
    function checkPoint(pt) {
        bounds.x  = Math.min(bounds.x,pt.x);
        bounds.y  = Math.min(bounds.y,pt.y);
        bounds.x2 = Math.max(bounds.x2,pt.x);
        bounds.y2 = Math.max(bounds.y2,pt.y);
    }
    lines.forEach(function(line) {
        checkPoint(line.start);
        checkPoint(line.end);
    })
    return bounds;
}