diff options
author | sanine <sanine.not@pm.me> | 2022-05-30 18:19:02 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-05-30 18:19:02 -0500 |
commit | 8aa6645f2311de78f74b35f804cc45c7fcf38f57 (patch) | |
tree | 95107aedc3305ef11526ef8dd846c249cc356cdb /src/modules/Util.js | |
parent | 9ccb4a7bc728fd0e85c04fddb802fde02b73cfe2 (diff) |
add brushesmain
Diffstat (limited to 'src/modules/Util.js')
-rw-r--r-- | src/modules/Util.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/Util.js b/src/modules/Util.js index 2375f10..165d1d0 100644 --- a/src/modules/Util.js +++ b/src/modules/Util.js @@ -14,4 +14,7 @@ function clamp(value, min, max) { return Math.min(Math.max(value, min), max); } -export { useAverage, clamp }; +function lerp(a, b, alpha) { + return ((1-alpha)*a) + (alpha*b); +} +export { useAverage, clamp, lerp }; |