[−][src]Module accelerometer::vector
Algebraic vector types generic over a number of axes and a component type.
The vector
Cargo feature must be enabled to use this functionality.
All vectors types impl the Vector trait, and all vector components
impl the Component trait. The Vector trait provides a number of
features, including accessing components by Index<usize>
, iterator
support via an iter() method which returns an Iter type,
and a to_array() method for returning the vector components as a
GenericArray
.
For vectors whose components impl Into<f32>
, a set of vector geometry
extensions are provided by the VectorExt trait, including computing
the distance between vectors and the magnitude of a vector.
Structs
F32x2 | 2-dimensional XY vector of |
F32x3 | 3-dimensional XYZ vector of |
I16x2 | 2-dimensional XY vector of |
I16x3 | 3-dimensional XYZ vector of |
I32x2 | 2-dimensional XY vector of |
I32x3 | 3-dimensional XYZ vector of |
I8x2 | 2-dimensional XY vector of |
I8x3 | 3-dimensional XYZ vector of |
Iter | Iterator over the components of an algebraic vector |
U16x2 | 2-dimensional XY vector of |
U16x3 | 3-dimensional XYZ vector of |
U32x2 | 2-dimensional XY vector of |
U32x3 | 3-dimensional XYZ vector of |
U8x2 | 2-dimensional XY vector of |
U8x3 | 3-dimensional XYZ vector of |
Traits
Component | Vector components. All components must be |
Vector | Vectors with numeric components |
VectorExt | Vector geometry extensions usable on vectors whose components can be
converted into |