Bounds { public void expandBounds(double x0, double y0) { if (!Double.isInfinite(x0)) { x.expand(x0); } if (!Double.isInfinite(y0)) { y.expand(y0); } }  void set(@NonNull Bounds copy); void set(double left, double top, double right, double bottom); void reset(); void expandBounds(double x0, double y0); @NonNull @Override String toString(); final Range x; final Range y; }
@Test public void expandBoundsOnce() { Bounds bounds = new Bounds(); bounds.expandBounds(0, 0); assertEquals(0, bounds.x.min, 0.01); assertEquals(0, bounds.x.max, 0.01); assertEquals(0, bounds.y.min, 0.01); assertEquals(0, bounds.y.max, 0.01); }
@Test public void expandBounds() { Bounds bounds = new Bounds(); bounds.expandBounds(0, 0); bounds.expandBounds(1, 1); assertEquals(0, bounds.x.min, 0.01); assertEquals(1, bounds.x.max, 0.01); assertEquals(0, bounds.y.min, 0.01); assertEquals(1, bounds.y.max, 0.01); }