From acce2da38c856518b4d1be3bdbc937d8c1eafa83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sat, 24 May 2014 21:38:08 +0200 Subject: [PATCH] filter: Fix get_direction for short vectors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Short vectors alongside the x axis produced inverted directions. Signed-off-by: Jonas Ã…dahl Reviewed-by: Hans de Goede --- src/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/filter.c b/src/filter.c index 45f060f9..df4d60a4 100644 --- a/src/filter.c +++ b/src/filter.c @@ -105,9 +105,9 @@ get_direction(int dx, int dy) else if (dx < 0 && dy < 0) dir = N | NW | W; else if (dx > 0) - dir = NW | W | SW; - else if (dx < 0) dir = NE | E | SE; + else if (dx < 0) + dir = NW | W | SW; else if (dy > 0) dir = SE | S | SW; else if (dy < 0)