Back to Index
Maps and clamps x from inLo..inHi to outLo..outHi.
x
inLo..inHi
outLo..outHi
MAP_CLAMP(x, inLo, inHi, outLo, outHi, &y);
// Example pattern from analog_macros.ems MAP_CLAMP(ain(1), 200, 900, 0, 100, pct);