public class DataRange extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
double |
max
The range
|
double |
min
The range
|
Constructor and Description |
---|
DataRange()
Default ctor
|
DataRange(DataRange r)
copy ctor
|
DataRange(double[] a)
ctor
|
DataRange(double min,
double max)
Create a range with min, max
|
Modifier and Type | Method and Description |
---|---|
double[] |
asArray()
Get a 2-aray array holding min/max
|
float[] |
asFloatArray()
Get a 2-aray array holding min/max
|
boolean |
equals(Object o)
Equals
|
double |
getAbsSpan()
get abs(max-min)
|
double |
getMax()
Get the max
|
double |
getMid()
Get the mid point
|
double |
getMin()
Get the min
|
double |
getPercent(double v)
Ge tthe percent the given value is between min and max
|
double |
getSpan()
max-min
|
double |
getValueOfPercent(double percent)
Get percent along the way between min and max
|
void |
set(double min,
double max)
set the values
|
void |
setMax(double v)
Set the max
|
void |
setMax(int v)
Set the max
|
void |
setMin(double v)
Set the min
|
void |
setMin(int v)
Set the min
|
double |
span()
max-min
|
public DataRange()
public DataRange(double min, double max)
min
- minmax
- maxpublic DataRange(double[] a)
a
- 2-ary array holding min/maxpublic DataRange(DataRange r)
r
- objectpublic boolean equals(Object o)
public void set(double min, double max)
min
- minmax
- maxpublic double getMin()
public double getMax()
public void setMin(double v)
v
- valuepublic void setMax(double v)
v
- valuepublic void setMin(int v)
v
- valuepublic void setMax(int v)
v
- valuepublic double[] asArray()
public float[] asFloatArray()
public double span()
public double getSpan()
public double getAbsSpan()
public double getMid()
public double getValueOfPercent(double percent)
percent
- percentpublic double getPercent(double v)
v
- valueCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.