diff options
| author | LLLL Colonq <llll@colonq> | 2024-06-11 01:48:31 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-06-11 01:48:31 -0400 |
| commit | 593d75fa14516119bb14762daedd6ae49e0824b1 (patch) | |
| tree | 1dae931b391541a1fbd6daff315695c59f83f227 /src/utils.rs | |
| parent | 6baca14ec9b70f1ffcdd6c456cf798f0f0f1e57b (diff) | |
Fix Cardinal::angle
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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, } } } |
