pub struct SensorReading {
pub x: f64,
pub y: f64,
pub z: f64,
}Expand description
One motion-sensor sample. Units are SI and depend on the SensorKind: m/s² for the
accelerometer, rad/s for the gyroscope, µT for the magnetometer (iOS g’s and any platform quirks
are normalized by the per-OS impls). Axis sign conventions are the platform’s own — e.g. a device
lying face-up reads z ≈ +9.8 on Android but z ≈ -9.8 on iOS.
Fields§
§x: f64Value along the device’s x axis.
y: f64Value along the device’s y axis.
z: f64Value along the device’s z axis.
Trait Implementations§
Source§impl Clone for SensorReading
impl Clone for SensorReading
Source§fn clone(&self) -> SensorReading
fn clone(&self) -> SensorReading
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SensorReading
impl Debug for SensorReading
Source§impl PartialEq for SensorReading
impl PartialEq for SensorReading
Source§fn eq(&self, other: &SensorReading) -> bool
fn eq(&self, other: &SensorReading) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SensorReading
impl StructuralPartialEq for SensorReading
Auto Trait Implementations§
impl Freeze for SensorReading
impl RefUnwindSafe for SensorReading
impl Send for SensorReading
impl Sync for SensorReading
impl Unpin for SensorReading
impl UnsafeUnpin for SensorReading
impl UnwindSafe for SensorReading
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