diff options
Diffstat (limited to 'res/qml/Mixxx/MathUtils.mjs')
-rw-r--r-- | res/qml/Mixxx/MathUtils.mjs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/qml/Mixxx/MathUtils.mjs b/res/qml/Mixxx/MathUtils.mjs new file mode 100644 index 0000000000..e399e23b87 --- /dev/null +++ b/res/qml/Mixxx/MathUtils.mjs @@ -0,0 +1,3 @@ +export function clamp(value, min, max) { + return Math.max(Math.min(value, max), min); +}; |