From 593d75fa14516119bb14762daedd6ae49e0824b1 Mon Sep 17 00:00:00 2001 From: LLLL Colonq Date: Tue, 11 Jun 2024 01:48:31 -0400 Subject: Fix Cardinal::angle --- src/utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index e0a0e29..bd435af 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,4 +1,4 @@ -#[derive(Clone, Debug, PartialEq, Eq, Hash)] +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum Cardinal { North, South, @@ -47,8 +47,8 @@ impl Cardinal { match self { Self::North => 0.0, Self::South => std::f32::consts::PI, - Self::West => 3.0 * std::f32::consts::PI / 2.0, - Self::East => std::f32::consts::PI / 2.0, + Self::West => std::f32::consts::PI / 2.0, + Self::East => 3.0 * std::f32::consts::PI / 2.0, } } } -- cgit v1.2.3