From 66186c7354e68b54056d03f66b32bdd208ccb158 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 6 Sep 2024 13:03:55 -0700 Subject: [PATCH] doc --- fixed_wide_vectors/src/vector.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fixed_wide_vectors/src/vector.rs b/fixed_wide_vectors/src/vector.rs index 212f126..0cc1ec8 100644 --- a/fixed_wide_vectors/src/vector.rs +++ b/fixed_wide_vectors/src/vector.rs @@ -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)] pub struct Vector{ pub(crate) array:[T;N],