This commit is contained in:
Quaternions 2024-09-06 13:03:55 -07:00
parent 36c769346c
commit 66186c7354

View File

@ -1,3 +1,8 @@
/// An array-backed vector type. Named fields are made accessible via the Deref/DerefMut traits which are implmented for 2-4 dimensions.
/// let mut v = Vector::new([1.0,2.0,3.0]);
/// v.x += v.z;
/// println!("v.x={}",v.x);
#[derive(Clone,Copy,Hash,Eq,PartialEq)] #[derive(Clone,Copy,Hash,Eq,PartialEq)]
pub struct Vector<const N:usize,T>{ pub struct Vector<const N:usize,T>{
pub(crate) array:[T;N], pub(crate) array:[T;N],