public class SliderRange
extends java.lang.Object
| Constructor and Description |
|---|
SliderRange() |
| Modifier and Type | Method and Description |
|---|---|
static DoubleInterval |
estimateBoundsIfNecessary(NumericInterval range0,
double x)
Estimates the range for a slider, given an initial range
range0 and an initial value x (assumed to be
within that range). |
static DoubleInterval |
roundBoundsTo125(NumericInterval range0)
Rounds the upper and lower bounds of a supplied range to conform to
|
static double |
roundDown125(double x)
Rounds a number x down to the nearest value defined by
|
static double |
roundUp125(double x)
Rounds a number x up to the nearest value defined by
|
public static double roundUp125(double x)
sgn(x) k 10^nwhere n is an integer and k is 1, 2, or 5.
x - number to round uppublic static double roundDown125(double x)
sgn(x) k 10^nwhere n is an integer and k is 1, 2, or 5.
x - number to round downpublic static DoubleInterval estimateBoundsIfNecessary(NumericInterval range0, double x)
range0 and an initial value x (assumed to be
within that range). Any finite bounds specified by range0
are preserved. In particular, if range0 is completely
bounded, the method simply returns a copy the range. Otherwise, if
either the upper or lower endpoints of the range are unbounded, the
method attempts to determine reasonable values for these, based on
x.range0 - initial range valuex - initial value to help determine bounds if necessarypublic static DoubleInterval roundBoundsTo125(NumericInterval range0)
+/- k 10^nwhere n is an integer and k is 1, 2 or 5.
range0 - range to be rounded