From 784b1ed702c72acd96c85e050fd513836106a694 Mon Sep 17 00:00:00 2001 From: Andrey Danilov Date: Sun, 17 Mar 2024 22:40:03 +0300 Subject: [PATCH] Fix effect of min/max values of sensors --- .../app/src/main/java/com/danand/juicynoise/utils/Math.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/juicy-noise-android/app/src/main/java/com/danand/juicynoise/utils/Math.kt b/juicy-noise-android/app/src/main/java/com/danand/juicynoise/utils/Math.kt index b751d5c..caf145d 100644 --- a/juicy-noise-android/app/src/main/java/com/danand/juicynoise/utils/Math.kt +++ b/juicy-noise-android/app/src/main/java/com/danand/juicynoise/utils/Math.kt @@ -53,7 +53,7 @@ fun normalizeOnto( val normalizedValue = ratio * (toEnd - toStart) + toStart var normalizedValueClamped = max(normalizedValue, toStart) - normalizedValueClamped = min(normalizedValue, toEnd) + normalizedValueClamped = min(normalizedValueClamped, toEnd) return normalizedValueClamped }