Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
A simple linear interpolation implementation between a fixed input and output range. More...
#include <util.hpp>
Public Member Functions | |
RangeMapperLinear (double inputLowerBound, double inputUpperBound, double outputLowerBound, double outputUpperBound) | |
Constructs a range mapper with a fixed pair of input and output ranges. | |
double | operator() (double value) const |
The operation that actually converts a value from its input range into its output range. | |
A simple linear interpolation implementation between a fixed input and output range.
RangeMapperLinear::RangeMapperLinear | ( | double | inputLowerBound, |
double | inputUpperBound, | ||
double | outputLowerBound, | ||
double | outputUpperBound ) |
Constructs a range mapper with a fixed pair of input and output ranges.
inputLowerBound | The start of the input range. |
inputUpperBound | The end of the input range. |
outputLowerBound | The start of the output range. |
outputUpperBound | The end of the output range. |
double RangeMapperLinear::operator() | ( | double | value | ) | const |
The operation that actually converts a value from its input range into its output range.
value | The value in the input range. |