vecmat
Low-dimensional vector and matrix structures and common operations for them
Documentation
Usage
extern crate vecmat;
use *;
use *;
Structs:
- Vectors:
vec::VecN<T>
whereN
is 2, 3 or 4 - Matrices:
mat::MatNxM<T>
(ormat::MatN<T>
for square matrices) whereN
andM
are 2, 3 or 4 - Transformations:
map::AffineN<T>
- affine transformation for vectors
Features:
Linear algebra
- Vector and matrix arithmetcs (component-wise
+
,-
,*
,/
) - Integer vector arithmetics (
div_floor
andmod_floor
for integer vectors) - Boolean vectors (vector comparison,
all
,any
) -
dot
,cross
andouter
products for vectors - Matrix-matrix and matrix-vector multiplication
- Square matrix
det
andinverse
Complex analysis
- Complex numbers
- Quaternions
Transformations
- Affine transformations for vector (with
inverse
) - Moebius transformation
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.