#[repr(C)]pub struct MagnetometerReading<T> {
pub x: T,
pub y: T,
pub z: T,
}Fields§
§x: TThe magnetic field strength along the x-axis, in Gauss.
y: TThe magnetic field strength along the y-axis, in Gauss.
z: TThe magnetic field strength along the z-axis, in Gauss.
Implementations§
Source§impl<T> MagnetometerReading<T>
impl<T> MagnetometerReading<T>
Source§impl<T> MagnetometerReading<T>
impl<T> MagnetometerReading<T>
Sourcepub const fn new(x: T, y: T, z: T) -> Self
pub const fn new(x: T, y: T, z: T) -> Self
Initializes a new MagnetometerReading instance.
Sourcepub fn north_east_down<C>(coordinate: C) -> Self
Available on crate feature coordinate-frame only.
pub fn north_east_down<C>(coordinate: C) -> Self
coordinate-frame only.Constructs a new MagnetometerReading instance from a reading in a given coordinate frame.
Trait Implementations§
Source§impl<T> Clone for MagnetometerReading<T>where
T: Clone,
impl<T> Clone for MagnetometerReading<T>where
T: Clone,
Source§impl<T> Debug for MagnetometerReading<T>where
T: Debug,
impl<T> Debug for MagnetometerReading<T>where
T: Debug,
Source§impl<T> Default for MagnetometerReading<T>where
T: Default,
impl<T> Default for MagnetometerReading<T>where
T: Default,
Source§impl<T> From<&MagnetometerReading<T>> for Vector3<T>where
T: Clone,
impl<T> From<&MagnetometerReading<T>> for Vector3<T>where
T: Clone,
Source§fn from(value: &MagnetometerReading<T>) -> Self
fn from(value: &MagnetometerReading<T>) -> Self
Converts to this type from the input type.
Source§impl<T, C> From<C> for MagnetometerReading<T>
Available on crate feature coordinate-frame only.
impl<T, C> From<C> for MagnetometerReading<T>
Available on crate feature
coordinate-frame only.Source§impl<T> From<MagnetometerReading<T>> for Vector3<T>
impl<T> From<MagnetometerReading<T>> for Vector3<T>
Source§fn from(value: MagnetometerReading<T>) -> Self
fn from(value: MagnetometerReading<T>) -> Self
Converts to this type from the input type.
Source§impl<T> Index<usize> for MagnetometerReading<T>
impl<T> Index<usize> for MagnetometerReading<T>
Source§impl<T> IndexMut<usize> for MagnetometerReading<T>
impl<T> IndexMut<usize> for MagnetometerReading<T>
Source§impl<T> Mul<T> for MagnetometerReading<T>
impl<T> Mul<T> for MagnetometerReading<T>
impl<T> Copy for MagnetometerReading<T>where
T: Copy,
Auto Trait Implementations§
impl<T> Freeze for MagnetometerReading<T>where
T: Freeze,
impl<T> RefUnwindSafe for MagnetometerReading<T>where
T: RefUnwindSafe,
impl<T> Send for MagnetometerReading<T>where
T: Send,
impl<T> Sync for MagnetometerReading<T>where
T: Sync,
impl<T> Unpin for MagnetometerReading<T>where
T: Unpin,
impl<T> UnwindSafe for MagnetometerReading<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.