2023-Robot
Robot code for 2023 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. | |
constexpr V | Map (const T inVal) const |
Generate interpolated output based on input. | |
constexpr V | operator() (const T inVal) const |
Generate interpolated output based on input. | |
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 |