pub struct Deviation(/* private fields */);Expand description
Compass deviation: the angle from magnetic north to compass north.
Positive is easterly. Magnetic course = compass course + deviation.
Implementations§
Source§impl Deviation
impl Deviation
Sourcepub fn new(degrees: f64) -> Result<Self>
pub fn new(degrees: f64) -> Result<Self>
Creates a deviation from a value in [-180.0, 180.0] degrees.
§Errors
Returns NavigationError::NotFinite for NaN or an infinity, and
NavigationError::OutOfRange outside [-180.0, 180.0].
Trait Implementations§
impl Copy for Deviation
Source§impl PartialOrd for Deviation
impl PartialOrd for Deviation
impl StructuralPartialEq for Deviation
Auto Trait Implementations§
impl Freeze for Deviation
impl RefUnwindSafe for Deviation
impl Send for Deviation
impl Sync for Deviation
impl Unpin for Deviation
impl UnsafeUnpin for Deviation
impl UnwindSafe for Deviation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more