|
FixMath
|
#include <FixMathMapper.h>
Public Member Functions | |
| FixMathMapperAccurate () | |
| FixMathMapperAccurate (in_type _in_min, in_type _in_max, out_type _out_min, out_type _out_max) | |
| void | setBounds (in_type _in_min, in_type _in_max, out_type _out_min, out_type _out_max) |
| out_type | map (in_type in) const |
A mapper, intended to work as Arduino's map, but faster as division is involved only when setBounds() is called, as custom-made for FixMath's types. This version uses invAccurate() to perform the calculations. The nearly biggest precision available, at the cost of some speed (platform and use-case dependent)
|
inline |
Constructor
|
inline |
Constructor
| _in_min | the lower bound of the input |
| _in_max | the higher bound of the input |
| _out_min | the lower bound of the output |
| _out_max | the higher bound of the output |
|
inline |
Map an input to the output range
| in | the input |
|
inline |
Set the bounds of the mapper
| _in_min | the lower bound of the input |
| _in_max | the higher bound of the input |
| _out_min | the lower bound of the output |
| _out_max | the higher bound of the output |