Library implementing fixed-length Vectors meant for representing dimensional values. Tested heavily to ensure safety during use.
```bash $ cd fixed-vectors $ cargo test ...
ok
as the test result.```
Voxel Struct
Example below shows how a
Voxel
might be represented as a struct,
using a Vector3.
```rust use fixed_vectors::Vector3;
pub struct Voxel {
/// Represents the positional value in 3D Space of the [Voxel
]
pub position: Vector3
Custom Vector
Example below shows how you would create a custom Vector Struct.
```rust use fixedvectors::implvector;
struct Vector5
impl_vector!(Vector5 { x, y, z, w, v }, 5);
fn main() {
println!("Vector5 Name: {}", Vector5::<()>::NAME);
println!("Vector5 Length: {}", Vector5::<()>::LEN);
println!("Vector5
let vector = Vector5::new(1, 2, 3, 4, 5);
println!("Vector: {}", vector);
println!("Vector Debug: {:?}", vector);
println!("Vector as Array: {:?}", vector.to_array());
println!("Vector as Vec: {:?}", vector.to_vec());
let mut sum = 0;
for i in vector { sum += i; }
println!("Vector Sum: {}", sum);
} ```