![]() |
2022-Robot
Robot code for 2022 FRC Season by Argos, FRC team #1756
|
Performs linear interpolation of a value based on a set of input->output mapping points. More...
#include <interpolation.h>
Public Member Functions | |
| InterpolationMap ()=delete | |
| constexpr | InterpolationMap (std::array< InterpMapPoint< T, V >, size > initArray) |
| Constructs new interpolation map. More... | |
| constexpr V | Map (const T inVal) const |
| Generate interpolated output based on input. More... | |
| constexpr V | operator() (const T inVal) const |
| Generate interpolated output based on input. More... | |
Private Attributes | |
| std::array< InterpMapPoint< T, V >, size > | m_mapArray |
Performs linear interpolation of a value based on a set of input->output mapping points.
| T | Type of interpolated input |
| size | Number of elements in interpolation map |
| V | Type of interpolated output |
|
delete |
|
inlineconstexpr |
Constructs new interpolation map.
| initArray | Interpolation points. Must be sorted by input value with smallest element first. |
|
inlineconstexpr |
Generate interpolated output based on input.
| inVal | Input value to remap |
|
inlineconstexpr |
Generate interpolated output based on input.
| inVal | Input value to remap |
Shorthand for InterpolationMap::Map()
|
private |