From 2b271ed5348daec2bcf90b83da47781e2d8b964c Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 14 May 2010 01:10:17 +0200 Subject: janitor: Move min/max and dist functions up to common.h Signed-off-by: Henrik Rydberg --- src/hwdata.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/hwdata.h') diff --git a/src/hwdata.h b/src/hwdata.h index 15a9fcb..5dd99cf 100644 --- a/src/hwdata.h +++ b/src/hwdata.h @@ -81,4 +81,11 @@ void init_hwdata(struct HWData *hw); int read_hwdata(struct HWData *hw, const struct input_event* ev); void output_hwdata(const struct HWData *hw); +static inline int finger_dist2(const struct FingerData *a, + const struct FingerData *b) +{ + return dist2(a->position_x - b->position_x, + a->position_y - b->position_y); +} + #endif -- cgit v1.2.3