static DoubleRange zeroToOneDoubleRangeFromRangeSlider(int max, RangeSlider slider) { ret swing(func -> DoubleRange { DoubleRange(doubleRatio(slider.getValue(), max), doubleRatio(slider.getUpperValue(), max)) }); }