This is a few essential functions from ixfx, boiled down and ensured working on the Espruino platform.
Read more
To use these fuctions you must require
them. To pull directly from GitHub:
const clamp = require("https://github.com/ClintH/ixfx-espruino/blob/main/clamp.js");
Alternatively, follow the instructions for storing the files locally.
- interpolate
- scale
- movingAverage
- timeout