From 1cfbf7f65b64c987ec99080ff8e25ccd7ccc88f5 Mon Sep 17 00:00:00 2001 From: Nolan Darilek Date: Sun, 1 Dec 2024 15:30:08 -0600 Subject: [PATCH] Fix wrong directions. --- src/core.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.rs b/src/core.rs index 0f7cd5f..360bb02 100644 --- a/src/core.rs +++ b/src/core.rs @@ -98,10 +98,10 @@ impl From for MovementDirection { h if h > PI / 8. && h <= 3. * PI / 8. => NorthEast, h if h > 3. * PI / 8. && h <= 5. * PI / 8. => North, h if h > 5. * PI / 8. && h <= 7. * PI / 8. => NorthWest, - h if h > 7. * PI / 8. || h <= -7. * PI / 8. => East, - h if h > -7. * PI / 8. && h <= -5. * PI / 8. => SouthEast, + h if h > 7. * PI / 8. || h <= -7. * PI / 8. => West, + h if h > -7. * PI / 8. && h <= -5. * PI / 8. => SouthWest, h if h > -5. * PI / 8. && h <= -3. * PI / 8. => South, - h if h > -3. * PI / 8. && h <= -PI / 8. => SouthWest, + h if h > -3. * PI / 8. && h <= -PI / 8. => SouthEast, _ => West, }) }