pub struct Vector3<V> { /* private fields */ }Implementations§
Source§impl<V> Vector3<V>
impl<V> Vector3<V>
pub fn create(components: &[V; 3]) -> Self
pub fn get_components(&self) -> [V; 3]
pub fn cross_product(&self, other: &Self) -> Self
pub fn cosine_angle_between_vectors(&self, other: &Self) -> Vwhere
V: FloatTrait<Output = V>,
pub fn projection_perpendicular_to_vector(&self, other: &Self) -> Selfwhere
V: FloatTrait<Output = V>,
pub fn rotation_matrix_to_align_with_vector(
&self,
other: &Self,
rel_tol: V,
abs_tol: V,
) -> Result<Matrix<V>, String>where
V: FloatTrait<Output = V>,
Trait Implementations§
Source§impl<V> BasicOperationsTrait for Vector3<V>
impl<V> BasicOperationsTrait for Vector3<V>
type Value = V
fn get_shape(&self) -> &Shape
fn get_mut_shape(&mut self) -> &mut Shape
fn get_elements(&self) -> &HashMap<Position, Self::Value>
fn get_mut_elements(&mut self) -> &mut HashMap<Position, Self::Value>
fn get_element_value(&self, position: &Position) -> Result<&Self::Value, String>
fn get_mut_element_value( &mut self, position: &Position, ) -> Result<&mut Self::Value, String>
fn shape_conformity_check<M>(
&self,
other: &M,
operation: Operation,
) -> Result<(), String>where
M: BasicOperationsTrait,
fn add<M>(&self, other: &M) -> Result<Self, String>
fn subtract<M>(&self, other: &M) -> Result<Self, String>
fn multiply_by_scalar(&self, scalar: Self::Value) -> Self
fn multiply<M>(&self, other: &M) -> Result<Matrix<Self::Value>, String>
fn transpose(&self) -> Self
fn remove_row(&self, row: usize) -> Result<Matrix<Self::Value>, String>
fn remove_column(&self, column: usize) -> Result<Matrix<Self::Value>, String>
fn show<F>(&self, f: F)
Source§impl<V> VectorTrait for Vector3<V>
impl<V> VectorTrait for Vector3<V>
fn vector_shape_conformity_check(&self) -> Result<(), String>
fn norm(&self) -> Result<<Self as BasicOperationsTrait>::Value, String>where
<Self as BasicOperationsTrait>::Value: FloatTrait<Output = <Self as BasicOperationsTrait>::Value>,
fn dot_product(
&self,
other: &Self,
) -> Result<<Self as BasicOperationsTrait>::Value, String>where
<Self as BasicOperationsTrait>::Value: FloatTrait<Output = <Self as BasicOperationsTrait>::Value>,
Self: Clone,
impl<V> StructuralPartialEq for Vector3<V>
Auto Trait Implementations§
impl<V> Freeze for Vector3<V>
impl<V> RefUnwindSafe for Vector3<V>where
V: RefUnwindSafe,
impl<V> Send for Vector3<V>where
V: Send,
impl<V> Sync for Vector3<V>where
V: Sync,
impl<V> Unpin for Vector3<V>where
V: Unpin,
impl<V> UnwindSafe for Vector3<V>where
V: UnwindSafe,
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