summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Michael Checo <michaelcheco@google.com> 2025-01-28 09:25:29 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2025-01-28 09:25:29 -0800
commit6eb2718241451ca25517421fb7b0bc6a3e388b4c (patch)
treedcf0943108b5d89c111c23221eaca11e57f6ddb7
parent846a73738309d1d2848d2c9b8b7c1f2c0abc9f54 (diff)
parent0698ecd28875ee913d0c930a6c89847eb72a1d74 (diff)
Merge "Pointer sensitivity: Adjust base gain range" into main
-rw-r--r--libs/input/AccelerationCurve.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/input/AccelerationCurve.cpp b/libs/input/AccelerationCurve.cpp
index 0b47f3e6e7..1ed9794105 100644
--- a/libs/input/AccelerationCurve.cpp
+++ b/libs/input/AccelerationCurve.cpp
@@ -47,9 +47,9 @@ constexpr std::array<double, 15> kSensitivityFactors = {1, 2, 4, 6, 7, 8,
// in faster pointer movements.
//
// The base gain is calculated using a linear mapping function that maps the
-// sensitivity range [-7, 7] to a base gain range [0.5, 2.0].
+// sensitivity range [-7, 7] to a base gain range [1.0, 3.5].
double calculateBaseGain(int32_t sensitivity) {
- return 0.5 + (sensitivity + 7) * (2.0 - 0.5) / (7 + 7);
+ return 1.0 + (sensitivity + 7) * (3.5 - 1.0) / (7 + 7);
}
} // namespace