Skip to content

Commit 2c5959a

Browse files
authored
Added an illustration to the compass direction docs (issue 13664) (#13788)
i based the design on @mgi388 in the discussion about the issue. i added the illustration in such a way that it shows up when you hover your mouse over the type, i hope this is what was meant by the issue no unit tests were added bc obviously Fixes #13664
1 parent 93f3432 commit 2c5959a

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

crates/bevy_math/src/compass.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ use bevy_reflect::Reflect;
55
use bevy_reflect::{ReflectDeserialize, ReflectSerialize};
66

77
/// A compass enum with 4 directions.
8+
/// ``` ignore
9+
/// N (North)
10+
/// ▲
11+
/// │
12+
/// │
13+
/// W (West) ┼─────► E (East)
14+
/// │
15+
/// │
16+
/// ▼
17+
/// S (South)
18+
/// ```
819
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
920
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
1021
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug, PartialEq))]
@@ -24,6 +35,17 @@ pub enum CompassQuadrant {
2435
}
2536

2637
/// A compass enum with 8 directions.
38+
/// ``` ignore
39+
/// N (North)
40+
/// ▲
41+
/// NW │ NE
42+
/// ╲ │ ╱
43+
/// W (West) ┼─────► E (East)
44+
/// ╱ │ ╲
45+
/// SW │ SE
46+
/// ▼
47+
/// S (South)
48+
/// ```
2749
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
2850
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
2951
#[cfg_attr(feature = "bevy_reflect", derive(Reflect), reflect(Debug, PartialEq))]

0 commit comments

Comments
 (0)