# [−][src]Module micromath::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 `f32` values F32x3 3-dimensional XYZ vector of `f32` values I16x2 2-dimensional XY vector of `i16` values I16x3 3-dimensional XYZ vector of `i16` values I32x2 2-dimensional XY vector of `i32` values I32x3 3-dimensional XYZ vector of `i32` values I8x2 2-dimensional XY vector of `i8` values I8x3 3-dimensional XYZ vector of `i8` values Iter Iterator over the components of an algebraic vector U16x2 2-dimensional XY vector of `u16` values U16x3 3-dimensional XYZ vector of `u16` values U32x2 2-dimensional XY vector of `u32` values U32x3 3-dimensional XYZ vector of `u16` values U8x2 2-dimensional XY vector of `u8` values U8x3 3-dimensional XYZ vector of `u8` values

## Traits

 Component Vector components. All components must be `Copy` + `Sized` types which support basic arithmetic (`Add`, `Sub`, `Mul`, `Div`), as well as `Default`, `PartialEq` and `PartialOrd`. Vector Vectors with numeric components VectorExt Vector geometry extensions usable on vectors whose components can be converted into `f32`.