Everyday math utilities.
# clamp
(value, lower, upper)
src/everyday-math.ts#L3 # round
(num, decimalPlaces) – Round half away from zero ('commercial' rounding)
Uses correction to offset floating-point inaccuracies.
Works symmetrically for positive and negative numbers.
See https://stackoverflow.com/a/48764436/419436
src/everyday-math.ts#L13 # scaleLinear
(rangeMin, rangeMax, domainMin, domainMax)
src/everyday-math.ts#L19 All contributions are welcome!