Image Component Library (ICL)
|
class representing a range with defined stepping More...
#include <SteppingRange.h>
Public Member Functions | |
SteppingRange () | |
create an empty range (min = max = 0) | |
SteppingRange (Type minVal, Type maxVal, Type stepping) | |
create a special Rage | |
template<class dstType > | |
const SteppingRange< dstType > | castTo () const |
casts this range into another depth | |
virtual bool | contains (Type value) const |
tests whether a given value is inside of this range | |
Type | nearest (Type value) |
returns the nearest value to the given one | |
Public Attributes | |
Type | stepping |
internal stepping parameter |
class representing a range with defined stepping
A Stepping range is a well defined interval I = [minVal,maxVal] with an also well defined stepping e.g. S. the SteppingRange contains all values {minVal, minVal+S, minVal+2*S,...} that are less then or equal to the maxVal
icl::utils::SteppingRange< Type >::SteppingRange | ( | ) | [inline] |
create an empty range (min = max = 0)
icl::utils::SteppingRange< Type >::SteppingRange | ( | Type | minVal, |
Type | maxVal, | ||
Type | stepping | ||
) | [inline] |
create a special Rage
const SteppingRange<dstType> icl::utils::SteppingRange< Type >::castTo | ( | ) | const [inline] |
casts this range into another depth
Reimplemented from icl::utils::Range< Type >.
virtual bool icl::utils::SteppingRange< Type >::contains | ( | Type | value | ) | const [inline, virtual] |
tests whether a given value is inside of this range
Reimplemented from icl::utils::Range< Type >.
Type icl::utils::SteppingRange< Type >::nearest | ( | Type | value | ) | [inline] |
returns the nearest value to the given one
-1st: value is clipped to the underlying range -2nd: if value is inside the range, the nearest implicit step is returned
Type icl::utils::SteppingRange< Type >::stepping |
internal stepping parameter