Represents a mapping function in a interval, suitable for evaluation between 0 .. 1 inclusive, and inversely evaluatable given original interval. Useful for transforming normalized ranges back and forth between a semantic mapping.
More...
#include <parameter.h>
|
| template<class Type , typename Select > |
| class | Param |
| |
Represents a mapping function in a interval, suitable for evaluation between 0 .. 1 inclusive, and inversely evaluatable given original interval. Useful for transforming normalized ranges back and forth between a semantic mapping.
◆ Mapping
Different curve mappings for the interval
| Enumerator |
|---|
| Lin | Maps linearly from min to max
|
| Exp | Maps exponentially from min to max.
Min and max cannot be zero in this case
|
◆ Range() [1/2]
Construct a default linear range from 0 to 1
◆ Range() [2/2]
Constructs a range from minValue to maxValue with parameterMapping mapping.
◆ getMapping()
| auto ape::Range::getMapping |
( |
| ) |
const |
|
inlinenoexcept |
Returns the Mapping this range was constructed with
◆ getMax()
| auto ape::Range::getMax |
( |
| ) |
const |
|
inlinenoexcept |
Returns the maximum of the constructed range
◆ getMin()
| auto ape::Range::getMin |
( |
| ) |
const |
|
inlinenoexcept |
return the minimum of the constructed range
◆ getNormalizer()
Retrieve a function pointer with appropriate Mapping and selectively quantized , for inverse transformation
- Returns
- A function pointer. Invoking this with getMin() and getMax() is equivalent to invoking inverse().
◆ getTransformer()
Retrieve a function pointer with appropriate Mapping and selectively quantized .
- Returns
- A function pointer. Invoking this with getMin() and getMax() is equivalent to invoking operator()().
◆ inverse()
| PFloat ape::Range::inverse |
( |
bool |
quantized, |
|
|
PFloat |
value |
|
) |
| const |
|
inlinenoexcept |
Normalizes value back to a 0 .. 1 range.
- See also
- operator()()
- Parameters
-
| quantized | Optionally rounds value before inverse transformation |
◆ operator()()
Evaluate the range as a f(x) function, where value is x
- See also
- inverse()
◆ Param
template<class Type , typename Select >
The documentation for this class was generated from the following file: