|
Arduino Universal Inputs
A collection of libraries for managing/processing input devices on Arduino.
|
Value transformation for basic linear interpolation. More...
#include <LinearTransform.h>


Public Member Functions | |
| LinearTransform (inputanalog_t fromLow, inputanalog_t fromHigh, inputanalog_t toLow, inputanalog_t toHigh) | |
| Create a new value transformation. More... | |
| inputanalog_t | transform (inputanalog_t raw) const |
| Perform the value transformation. More... | |
Public Member Functions inherited from IValueTransform | |
| IValueTransform (inputanalog_t fromLow, inputanalog_t fromHigh) | |
| Create a new value transformation. More... | |
Additional Inherited Members | |
Protected Attributes inherited from IValueTransform | |
| inputanalog_t | m_fromLow |
| Lowest input value. | |
| inputanalog_t | m_fromHigh |
| Highest input value. | |
Value transformation for basic linear interpolation.
|
inline |
Create a new value transformation.
| fromLow | Lowest mapped inout value |
| fromHigh | Highest mapped input value |
| toLow | Lowest mapped output value |
| toHigh | Highest mapped output value |
|
inlinevirtual |
Perform the value transformation.
| raw | Value to transform |
Performs basic linear interpolation.
Implements IValueTransform.
1.8.6