# `Definitive` The definitive vector and matrix library for Rust ```rust use definitive::Vector; let a = Vector::new([2, 3, 1]); let b = Vector::new([8, 0, 0]); let c = a + b * (b * 2); ``` ## SIMD `Definitive` provides the default feature `simd` which enables and disables hand written SIMD implementations of certain `Vector` and `Matrix` variants. Hand optimized variants are documented under their own traits ## `#![no_std]` This crate supports `#![no_std]` environments, and support can be enabled by disabling the `std` feature ## Current issues The biggest issue currently is supporting arbritrary matrices, as type signature such as the following are not allowed. As far as I can tell, we might get this [someday](https://github.com/rust-lang/rust/issues/44580), but const generics are still in their infancy. ```rust struct Matrix([T; { L.iter().product() }]); ``` Another issue I'm facing is with specialization. I want to allow `vec * scalar` operations, but I cannot for the life of me figure out a way to do that without adding an unnecessary `Copy` bound on the `vec`'s `T`. This is in most cases non issue, and does not cause any inefficiencies as the members of the `vec` are not actually copied anywhere. In future this bound might get removed, as I learn how to actually use the type system D: ## Progress * [ ] `Vector` * [x] `Clone` * [x] `Copy` * [x] `Debug` * [ ] `Display` * [x] `Eq` * [x] `PartialEq` * [x] `Add` * [x] `AddAssign` * [x] `Sub` * [x] `SubAssign` * [x] `Mul` * [x] `MulAssign` * [x] `Div` * [x] `DivAssign` * [x] `Rem` * [x] `RemAssign` * [x] `Neg` * [ ] `BitAnd` * [ ] `BitAndAssign` * [ ] `BitOr` * [ ] `BitOrAssign` * [ ] `BitXor` * [ ] `BitXorAssign` * [ ] `Shl` * [ ] `ShlAssign` * [ ] `Shr` * [ ] `ShrAssign` * [ ] `Not` * [ ] `Hash` * [ ] `Matrix` (blocked on https://github.com/rust-lang/rust/issues/44580)