Example usage:
import { minMax } from "@thalesrc/js-utils/math"; const limitedValue = minMax(200, 300, Math.random() * 1000);
Example as Math static:
import "@thalesrc/js-utils/math/static/min-max"; const limitedValue = Math.minMax(200, 300, Math.random() * 1000);
minimum limit
maximum limit
value to limit
the limited value (returns NaN if an argument is NaN)
Generated using TypeDoc
Limits the value by specified range
Example usage:
import { minMax } from "@thalesrc/js-utils/math"; const limitedValue = minMax(200, 300, Math.random() * 1000);
Example as Math static:
import "@thalesrc/js-utils/math/static/min-max"; const limitedValue = Math.minMax(200, 300, Math.random() * 1000);