https://deepbluembedded.com/map-function-embedded-c/
Map Function, Constrain, FIR Filters, And Other Math Functions