summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authora1xd <[email protected]>2021-07-06 16:36:13 -0400
committera1xd <[email protected]>2021-07-06 16:36:13 -0400
commit9efc361b55cd6fa62deaa0bb4942c773f43da6f2 (patch)
tree7b728fbff41c4174e0bbb7a9f00050ea002b16e4
parentuse standard syntax for writer options (diff)
downloadrawaccel-9efc361b55cd6fa62deaa0bb4942c773f43da6f2.tar.xz
rawaccel-9efc361b55cd6fa62deaa0bb4942c773f43da6f2.zip
allow p < 2 in Lp distance mode
-rw-r--r--common/rawaccel.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp
index fb2d81a..4e8b46c 100644
--- a/common/rawaccel.hpp
+++ b/common/rawaccel.hpp
@@ -162,10 +162,10 @@ namespace rawaccel {
apply_dir_mul_x = directional_multipliers.x != 1;
apply_dir_mul_y = directional_multipliers.y != 1;
- if (!args.combine_mags) dist_mode = separate;
- else if (p >= MAX_NORM) dist_mode = max;
- else if (p > 2) dist_mode = Lp;
- else dist_mode = euclidean;
+ if (!args.combine_mags) dist_mode = separate;
+ else if (p >= MAX_NORM || p <= 0) dist_mode = max;
+ else if (p != 2) dist_mode = Lp;
+ else dist_mode = euclidean;
}
mouse_modifier() = default;