Struct lis2dw12::F32x3[][src]

pub struct F32x3 {
    pub x: f32,
    pub y: f32,
    pub z: f32,
}
Expand description

3-dimensional XYZ vector of f32 values

Fields

x: f32
Expand description

X component

y: f32
Expand description

Y component

z: f32
Expand description

Z component

Implementations

impl F32x3[src]

pub fn new(x: f32, y: f32, z: f32) -> F32x3[src]

Instantiate from X,Y,Z components

Trait Implementations

impl Clone for F32x3[src]

pub fn clone(&self) -> F32x3[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for F32x3[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl Default for F32x3[src]

pub fn default() -> F32x3[src]

Returns the “default value” for a type. Read more

impl From<(f32, f32, f32)> for F32x3[src]

pub fn from(vector: (f32, f32, f32)) -> F32x3[src]

Performs the conversion.

impl From<I16x3> for F32x3[src]

pub fn from(vector: I16x3) -> F32x3[src]

Performs the conversion.

impl From<I8x3> for F32x3[src]

pub fn from(vector: I8x3) -> F32x3[src]

Performs the conversion.

impl From<U16x3> for F32x3[src]

pub fn from(vector: U16x3) -> F32x3[src]

Performs the conversion.

impl From<U8x3> for F32x3[src]

pub fn from(vector: U8x3) -> F32x3[src]

Performs the conversion.

impl Index<usize> for F32x3[src]

type Output = f32

The returned type after indexing.

pub fn index(&self, i: usize) -> &f32[src]

Performs the indexing (container[index]) operation. Read more

impl MulAssign<f32> for F32x3[src]

pub fn mul_assign(&mut self, n: f32)[src]

Performs the *= operation. Read more

impl PartialEq<F32x3> for F32x3[src]

pub fn eq(&self, other: &F32x3) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

pub fn ne(&self, other: &F32x3) -> bool[src]

This method tests for !=.

impl Vector for F32x3[src]

type Component = f32

Type representing measured acceleration for a particular axis

type Axes = UInt<UInt<UTerm, B1>, B1>

Number of axes

pub const MIN: f32[src]

Smallest value representable by a vector component

pub const MAX: f32[src]

Largest value representable by a vector component

pub fn from_iter<I>(into_iter: I) -> F32x3 where
    I: IntoIterator<Item = <F32x3 as Vector>::Component>, 
[src]

Instantiate a Vector from an iterator over Self::Component values. Read more

pub fn get(self, i: usize) -> Option<<F32x3 as Vector>::Component>[src]

Get the component value for a particular index

pub fn to_array(self) -> GenericArray<f32, UInt<UInt<UTerm, B1>, B1>>[src]

Obtain an array of the acceleration components for each of the axes

fn from_slice(slice: &[Self::Component]) -> Self[src]

Instantiate a vector from a slice of components. Read more

fn iter(&self) -> Iter<'_, Self>[src]

Iterate over the components of a vector

impl Copy for F32x3[src]

impl StructuralPartialEq for F32x3[src]

Auto Trait Implementations

impl Send for F32x3

impl Sync for F32x3

impl Unpin for F32x3

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, A, C> VectorExt for V where
    C: Component + Into<f32>,
    V: Vector<Axes = A, Component = C> + MulAssign<f32>,
    A: ArrayLength<C>, 
[src]

pub fn distance(self, other: V) -> f32[src]

Compute the distance between two vectors

pub fn magnitude(self) -> f32[src]

Compute the magnitude of a vector