Package io.deephaven.plot.util
Class Range
java.lang.Object
io.deephaven.plot.util.Range
- All Implemented Interfaces:
Serializable
Continuous range.
- See Also:
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Range
public Range(double min, double max) Create a new range with a closed minimum interval and an open maximum interval.- Parameters:
min
- minimum value for the rangemax
- maximum value for the range
-
Range
public Range(double min, double max, boolean minOpen, boolean maxOpen) Create a new range.- Parameters:
min
- minimum value for the rangemax
- maximum value for the rangeminOpen
- true if the minimum is an open interval; false for a closed interval.maxOpen
- true if the maximum is an open interval; false for a closed interval.
-
-
Method Details
-
inRange
public boolean inRange(double d) Determine if a value is in the range.- Parameters:
d
- determine if this value is in the range- Returns:
- true if the value is in the range; false otherwise.
-
getMin
public double getMin()Gets the min value of the range- Returns:
- min of the range
-
getMax
public double getMax()Gets the max value of the range- Returns:
- max of the range
-