Returns true if this area is rectangular.
509611
public boolean isRectangular () {
        return (_isPolygonal) && (_rulesSize <= 5) && (_coordsSize <= 8) &&
            (_coords[1] == _coords[3]) && (_coords[7] == _coords[5]) &&
            (_coords[0] == _coords[6]) && (_coords[2] == _coords[4]);
    }
1191752
private int countAreas(Area a, Rectangular r)
    {
        int ret = 0;
        
        for (int i = 0; i < a.getChildCount(); i++)
        {
            Area n = a.getChildAt(i);
            if (a.getTopology().getPosition(n).intersects(r))
                ret++;
        }
        return ret;
    }
91457
@Override
	@Pure
	public boolean intersects(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) {
		if (boundsIntersects(rectangle)) {
			for (final PointGroup grp : groups()) {
				for (final Point2d pts : grp) {
					if (rectangle.contains(pts)) {
						return true;
					}
				}
			}
		}
		return false;
	}
1148889
public boolean isRangeSet() {
		for (int i = 0; i < getDimensions(); i++) {
			if( valueMin[i] == 0 && valueMax[i] == 0 ) {
				return false;
			}
		}

		return true;
	}
401763
public static boolean inArea(Point point, Rect area, float offsetRatio) {
        int offset = (int) (area.width() * offsetRatio);
        return point.x >= area.left - offset && point.x <= area.right + offset &&
                point.y >= area.top - offset && point.y <= area.bottom + offset;
    }
526004
def _calculate_areas(self, label):
        """"""
        heights = np.maximum(0, label[:, 3] - label[:, 1])
        widths = np.maximum(0, label[:, 2] - label[:, 0])
        return heights * widths
817649
def is_visible(self, x, y):
        
        return ((x >= 0) and
                (x <= self.width) and
                (y >= self._start_line) and
                (y < self._start_line + self.height))
574040
public final boolean isScrollable(@NonNull final Area area) {
        return topScrollableArea != null && topScrollableArea.getIndex() <= area.getIndex() &&
                bottomScrollableArea.getIndex() >= area.getIndex();
    }
105370
public boolean isInClipArea(final long pX, final long pY) {
        return pX > mXMin && pX < mXMax && pY > mYMin && pY < mYMax;
    }
1210302
boolean ensureCCW( SquareGrid grid ) {
		if( grid.columns <= 2 && grid.rows <= 2 )
			return true;

		Point2D_F64 a,b,c;

		a = grid.get(0,0).center;
		if( grid.columns > 2)
			b = grid.get(0,2).center;
		else
			b = grid.get(1,1).center;

		if( grid.rows > 2)
			c = grid.get(2,0).center;
		else
			c = grid.get(1,1).center;

		double x0 = b.x-a.x;
		double y0 = b.y-a.y;

		double x1 = c.x-a.x;
		double y1 = c.y-a.y;

		double z = x0 * y1 - y0 * x1;
		if( z < 0 ) {
			// flip it along an axis which is symmetric
			if( grid.columns%2 == 1 )
				tools.flipColumns(grid);
			else if( grid.rows%2 == 1 )
				tools.flipRows(grid);
			else
				return false;
		}
		return true;
	}
949435
private void checkDeclareAlg(GrayF32 image) {
		if( prevWidth != image.width || prevHeight != image.height ) {
			prevWidth = image.width;
			prevHeight = image.height;
			alg = new GeneralPurposeFFT_F32_2D(image.height,image.width);
		}
	}
932709
public function is_empty_area() {
        if ($child = $this->get_area_backup(0, '/', '.')) {
            if (!$child->is_empty_area()) {
                return false;
            }
        }
        if ($child = $this->get_area_intro(0, '/', '.')) {
            if (!$child->is_empty_area()) {
                return false;
            }
        }

        foreach ($this->areas as $area=>$desctiption) {
            if ($child = $this->get_file_info('mod_'.$this->modname, $area, null, null, null)) {
                if (!$child->is_empty_area()) {
                    return false;
                }
            }
        }

        return true;
    }
726414
protected boolean isInFastBounds(RectangleRotate_F32 region) {

		squareToImageSample(-0.5f, -0.5f, region);
		if( !interpolate.isInFastBounds(imageX, imageY))
			return false;
		squareToImageSample(-0.5f, 0.5f, region);
		if( !interpolate.isInFastBounds(imageX, imageY))
			return false;
		squareToImageSample(0.5f, 0.5f, region);
		if( !interpolate.isInFastBounds(imageX, imageY))
			return false;
		squareToImageSample(0.5f, -0.5f, region);
		if( !interpolate.isInFastBounds(imageX, imageY))
			return false;

		return true;
	}
401885
@Override
	@Pure
	public boolean intersects(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) {
		if (boundsIntersects(rectangle)) {

			if (rectangle.intersects(getBoundingBox())) {
				return true;
			}

			if (this.isWidePolyline) {
				final Rectangle2afp<?, ?, ?, ?, ?, ?> box = rectangle.toBoundingBox();
				final double rminX = box.getMinX();
				final double rminY = box.getMinY();
				final double rmaxX = box.getMaxX();
				final double rmaxY = box.getMaxY();

				final double width = getWidth();

				boolean firstPoint;
				double px = 0;
				double py = 0;

				for (final PointGroup grp : groups()) {
					firstPoint = true;
					for (final Point2d pts : grp) {
						final double x = pts.getX();
						final double y = pts.getY();

						if (firstPoint) {
							firstPoint = false;
						} else if (MathUtil.min(
								Segment2afp.calculatesDistanceSquaredSegmentSegment(rminX, rmaxY, rmaxX, rmaxY, px, py, x, y),
								Segment2afp.calculatesDistanceSquaredSegmentSegment(rminX, rminY, rminX, rmaxY, px, py, x, y),
								Segment2afp.calculatesDistanceSquaredSegmentSegment(rmaxX, rminY, rmaxX, rmaxY, px, py, x, y))
								<= width * width) {
							return true;
						}

						px = x;
						py = y;
					}
				}
			} else {
				return toPath2D().intersects(rectangle);
			}
		}
		return false;
	}
441891
public boolean isIntersecting(double xmin_, double ymin_, double xmax_, double ymax_) {
		// No need to check if empty, this will work for empty geoms too (IEEE
		// math)
		return ((xmin <= xmin_) ? xmax >= xmin_ : xmax_ >= xmin) && // check
																	// that x
																	// projections
																	// overlap
				((ymin <= ymin_) ? ymax >= ymin_ : ymax_ >= ymin); // check that
																	// y
																	// projections
																	// overlap
	}
620659
public boolean isValid() {
		if (!isEmpty()) {
			for (int i = 0; i < polygons.length; i++) {
				if (!polygons[i].isValid()) {
					return false;
				}
				for (int j = i + 1; j < polygons.length; j++) {
					if (polygons[i].intersects(polygons[j])) {
						return false;
					}
				}
			}
		}
		return true;
	}
512615
def get_area(self):
        """"""
        return (self.p2.x-self.p1.x)*(self.p2.y-self.p1.y)