summaryrefslogtreecommitdiff
path: root/src/libinput-util.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-06-16 13:52:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-06-16 13:52:02 +1000
commit2b99363a1ff948917a1a81c18d6079fb4a8cd4c2 (patch)
tree79bba625edcd0e82e30fa302475124d8bacee5ed /src/libinput-util.h
parent99aa1f5dc3593826e512460a5c914a87a3a7c16a (diff)
parent8025b374d564f4a30b089e5cf6fd65e0c6af8da2 (diff)
Merge branch 'master' into tablet-support
Diffstat (limited to 'src/libinput-util.h')
-rw-r--r--src/libinput-util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libinput-util.h b/src/libinput-util.h
index 5db3e3fa..9c00f792 100644
--- a/src/libinput-util.h
+++ b/src/libinput-util.h
@@ -308,4 +308,10 @@ int parse_mouse_dpi_property(const char *prop);
int parse_mouse_wheel_click_angle_property(const char *prop);
double parse_trackpoint_accel_property(const char *prop);
+static inline double
+vector_length(double x, double y)
+{
+ return sqrt(x * x + y * y);
+}
+
#endif /* LIBINPUT_UTIL_H */