@Test public void testRatio() throws Exception { Region r1 = new Region(1, 2); Region r2 = new Region(0, 100); assertEquals(0.01, r1.ratio(r2)); assertEquals(100.0, r2.ratio(r1)); r1 = new Region(0f, 21402646f); r2 = new Region(0, 999); }
public Number ratio(Region r2) { return ratio(r2.getMin().doubleValue(), r2.getMax().doubleValue()); }
Region { public Number ratio(Region r2) { return ratio(r2.getMin().doubleValue(), r2.getMax().doubleValue()); } }
Region { public Number ratio(Region r2) { return ratio(r2.getMin().doubleValue(), r2.getMax().doubleValue()); } Region();  Region(Number v1, Number v2); }
Region { public Number ratio(Region r2) { return ratio(r2.getMin().doubleValue(), r2.getMax().doubleValue()); } Region();  Region(Number v1, Number v2); static Region withDefaults(Region defaults); void setMinMax(Region region); static Number measure(Number v1, Number v2); Number length(); boolean contains(Number value); boolean intersects(Region region); Number center(); Number transform(double value, Region region2); Number transform(double value, Region region2, boolean flip); double transform(double value, double min, double max, boolean flip); Number ratio(Region r2); double ratio(double min, double max); void union(Number value); void union(Region input); void intersect(Region input); boolean intersects(Number line2Min, Number line2Max); boolean isMinSet(); Number getMin(); void setMin(Number min); boolean isMaxSet(); Number getMax(); void setMax(Number max); boolean isDefined(); @Override String toString(); }
Region { public Number ratio(Region r2) { return ratio(r2.getMin().doubleValue(), r2.getMax().doubleValue()); } Region();  Region(Number v1, Number v2); static Region withDefaults(Region defaults); void setMinMax(Region region); static Number measure(Number v1, Number v2); Number length(); boolean contains(Number value); boolean intersects(Region region); Number center(); Number transform(double value, Region region2); Number transform(double value, Region region2, boolean flip); double transform(double value, double min, double max, boolean flip); Number ratio(Region r2); double ratio(double min, double max); void union(Number value); void union(Region input); void intersect(Region input); boolean intersects(Number line2Min, Number line2Max); boolean isMinSet(); Number getMin(); void setMin(Number min); boolean isMaxSet(); Number getMax(); void setMax(Number max); boolean isDefined(); @Override String toString();  }