Replace 12:00 with ahead, and 6:00 with behind.
This commit is contained in:
parent
47fd4fb5a5
commit
e6fce1e28f
|
@ -390,19 +390,19 @@ pub trait PointLike {
|
|||
let bearing = self.bearing(other);
|
||||
let relative = (bearing - yaw).degrees();
|
||||
match relative {
|
||||
v if v <= 15. => "12:00".into(),
|
||||
v if v <= 15. => "ahead".into(),
|
||||
v if v <= 45. => "11:00".into(),
|
||||
v if v <= 75. => "10:00".into(),
|
||||
v if v <= 105. => "9:00".into(),
|
||||
v if v <= 135. => "8:00".into(),
|
||||
v if v <= 165. => "7:00".into(),
|
||||
v if v <= 195. => "6:00".into(),
|
||||
v if v <= 195. => "behind".into(),
|
||||
v if v <= 225. => "5:00".into(),
|
||||
v if v <= 255. => "4:00".into(),
|
||||
v if v <= 285. => "3:00".into(),
|
||||
v if v <= 315. => "2:00".into(),
|
||||
v if v <= 345. => "1:00".into(),
|
||||
_ => "12:00".into(),
|
||||
_ => "ahead".into(),
|
||||
}
|
||||
} else {
|
||||
self.direction(other).into()
|
||||
|
|
Loading…
Reference in New Issue
Block a user