@Test public void getCenterXTest() { Rectangle rectangle = create(1, 2, 3, 4); Assert.assertEquals(2, rectangle.getCenterX(), 0); }
public double getCenterX() { return (this.left + this.right) / 2; }
Rectangle implements Serializable { public double getCenterX() { return (this.left + this.right) / 2; } }
Rectangle implements Serializable { public double getCenterX() { return (this.left + this.right) / 2; } Rectangle(double left, double top, double right, double bottom); }
Rectangle implements Serializable { public double getCenterX() { return (this.left + this.right) / 2; } Rectangle(double left, double top, double right, double bottom); boolean contains(Point point); Rectangle enlarge(double left, double top, double right, double bottom); Rectangle envelope(double padding); @Override boolean equals(Object obj); Point getCenter(); double getCenterX(); double getCenterY(); double getHeight(); double getWidth(); @Override int hashCode(); boolean intersects(Rectangle rectangle); boolean intersectsCircle(double pointX, double pointY, double radius); Rectangle shift(Point origin); @Override String toString(); }
Rectangle implements Serializable { public double getCenterX() { return (this.left + this.right) / 2; } Rectangle(double left, double top, double right, double bottom); boolean contains(Point point); Rectangle enlarge(double left, double top, double right, double bottom); Rectangle envelope(double padding); @Override boolean equals(Object obj); Point getCenter(); double getCenterX(); double getCenterY(); double getHeight(); double getWidth(); @Override int hashCode(); boolean intersects(Rectangle rectangle); boolean intersectsCircle(double pointX, double pointY, double radius); Rectangle shift(Point origin); @Override String toString(); final double bottom; final double left; final double right; final double top; }