summaryrefslogtreecommitdiff
path: root/src/modules/Util.js
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2022-05-31 20:52:15 -0500
committersanine <sanine.not@pm.me>2022-05-31 20:52:15 -0500
commit5efc7885e1c3959aa165be640858ffb3f8a5860b (patch)
tree6865327d6affd6df2c4f61ed3b9d5ab446e2b23e /src/modules/Util.js
parent8aa6645f2311de78f74b35f804cc45c7fcf38f57 (diff)
refactor: remove modules/ folder
Diffstat (limited to 'src/modules/Util.js')
-rw-r--r--src/modules/Util.js20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/modules/Util.js b/src/modules/Util.js
deleted file mode 100644
index 165d1d0..0000000
--- a/src/modules/Util.js
+++ /dev/null
@@ -1,20 +0,0 @@
-function useAverage() {
- var avg = 0;
- let weight = 0;
- const append = value => {
- avg = (weight * avg) + value;
- weight += 1;
- avg = avg/weight;
- }
-
- return [() => avg, append];
-}
-
-function clamp(value, min, max) {
- return Math.min(Math.max(value, min), max);
-}
-
-function lerp(a, b, alpha) {
- return ((1-alpha)*a) + (alpha*b);
-}
-export { useAverage, clamp, lerp };