ValueLimiter

Members

Functions

correctMinMax
void correctMinMax(T v)
Undocumented in source. Be warned that the author may not have intended to support it.
correctValuesMinMax
void correctValuesMinMax()
Undocumented in source. Be warned that the author may not have intended to support it.
full
T full(T v)
Undocumented in source. Be warned that the author may not have intended to support it.
get
T get(size_t i)
getNorm
T getNorm(size_t i)
moveValues
void moveValues(size_t k)
Undocumented in source. Be warned that the author may not have intended to support it.
norm
T norm(T v)
Undocumented in source. Be warned that the author may not have intended to support it.
set
T set(size_t i, T v)
setNorm
T setNorm(size_t i, T nv)

Properties

maxLimit
T maxLimit [@property getter]
maxLimit
T maxLimit [@property setter]
minLimit
T minLimit [@property getter]
minLimit
T minLimit [@property setter]

Variables

max_limit
T max_limit;
Undocumented in source.
min_limit
T min_limit;
Undocumented in source.
values
T[CNT] values;

Examples

auto vh = ValueLimiter!(2,float)();

vh.minLimit = 0;
vh.maxLimit = 10;

vh.set( 0, 5 );
vh.set( 1, 7 );

assert( vh.get(0) == 5 );
assert( vh.get(1) == 7 );

vh.set(1,3);

assert( vh.get(0) == 3 );
assert( vh.get(1) == 3 );

vh.set(1,20);
assert( vh.get(0) == 3 );
assert( vh.get(1) == 10 );

Meta