Expand description
Angle normalisation.
A common source of bearing bugs. Every function that produces a bearing normalises before returning, so callers never have to check whether they are holding 350 or -10.
Functions§
- diff
- Signed difference
from - to, wrapped to-180.0..=180.0. - norm_
180 - Wraps an angle into
-180.0..=180.0, positive to starboard – the range every relative angle in this crate is returned in (wind angles, course differences). - norm_
360 - Wraps an angle into
0.0..360.0– the range every bearing, heading and course in this crate is returned in. - reciprocal
- The opposite bearing.