pub struct VecN {
pub components: Vec<f64>,
}Fields§
§components: Vec<f64>Implementations§
Source§impl VecN
impl VecN
pub fn new(components: Vec<f64>) -> Self
pub fn zeros(n: usize) -> Self
pub fn dim(&self) -> usize
pub fn dot(&self, rhs: &Self) -> f64
pub fn magnitude(&self) -> f64
pub fn normalize(&self) -> Self
pub fn scale(&self, s: f64) -> Self
pub fn add_vec(&self, rhs: &Self) -> Self
pub fn sub_vec(&self, rhs: &Self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VecN
impl RefUnwindSafe for VecN
impl Send for VecN
impl Sync for VecN
impl Unpin for VecN
impl UnsafeUnpin for VecN
impl UnwindSafe for VecN
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more