mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-23 11:38:37 +00:00
clamp function
This commit is contained in:
parent
8c93e578a0
commit
9971867e2f
@ -213,3 +213,5 @@ export const splitAt = function (index, value) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const zipWith = (f, xs, ys) => xs.map((n, i) => f(n, ys[i]));
|
export const zipWith = (f, xs, ys) => xs.map((n, i) => f(n, ys[i]));
|
||||||
|
|
||||||
|
export const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user