Class ScaleRange
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.style.ScaleRange
-
public class ScaleRange extends Object
-
-
Constructor Summary
Constructors Constructor Description ScaleRange(Float scaleMin, Float scaleMax, Boolean logarithmic)
ScaleRange(Extent<Float> scaleRange, Boolean logarithmic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Float
getScaleMax()
Float
getScaleMin()
Boolean
isLogarithmic()
Float
scaleZeroToOne(Number input)
Scales an input number to the range 0-1.
-
-
-
Method Detail
-
getScaleMin
public Float getScaleMin()
-
getScaleMax
public Float getScaleMax()
-
isLogarithmic
public Boolean isLogarithmic()
-
scaleZeroToOne
public Float scaleZeroToOne(Number input)
Scales an input number to the range 0-1. Will return a number outside this range if necessary, but the result can ONLY be interpreted as "out-of-range" (i.e. the amount by which it is out-of-range should not be used)- Parameters:
input
- The input number- Returns:
- A number from 0-1 if in range, a number outside 0-1 if out-of-range, and null if null/NaN
-
-