pub struct Matrix<const M: usize, const N: usize, T: Sized + Copy + Default> {
pub values: [[T; N]; M],
}Fields§
§values: [[T; N]; M]Implementations§
Source§impl Matrix<2, 2, f64>
impl Matrix<2, 2, f64>
pub fn rotation_counterclockwise(angle: f64) -> Self
Available on crate feature
std only.pub fn rotate_counterclockwise(&self, angle: f64) -> Self
Available on crate feature
std only.pub fn rotation_clockwise(angle: f64) -> Self
Available on crate feature
std only.pub fn rotate_clockwise(&self, angle: f64) -> Self
Available on crate feature
std only.pub const fn sheered_x(factor: f64) -> Self
pub const fn sheer_x(&self, factor: f64) -> Self
pub const fn sheered_y(factor: f64) -> Self
pub const fn sheer_y(&self, factor: f64) -> Self
pub const fn scaled_x(factor: f64) -> Self
pub const fn scale_x(&self, factor: f64) -> Self
pub const fn scaled_y(factor: f64) -> Self
pub const fn scale_y(&self, factor: f64) -> Self
pub const fn scaled(factor: f64) -> Self
pub const fn scale(&self, factor: f64) -> Self
pub const fn reflected() -> Self
pub const fn reflect(&self) -> Self
pub const fn reflected_x() -> Self
pub const fn reflect_x(&self) -> Self
pub const fn reflected_y() -> Self
pub const fn reflect_y(&self) -> Self
Source§impl Matrix<3, 1, f64>
impl Matrix<3, 1, f64>
pub const fn translate(&self, x: f64, y: f64) -> Self
pub fn rotate_x<T: ToF64 + Copy>(&self, angle: T) -> Self
Available on crate feature
std only.pub fn rotate_y<T: ToF64 + Copy>(&self, angle: T) -> Self
Available on crate feature
std only.pub fn rotate_z<T: ToF64 + Copy>(&self, angle: T) -> Self
Available on crate feature
std only.pub fn rotate_zyx<T: ToF64 + Copy>( &self, x_angle: T, y_angle: T, z_angle: T, ) -> Self
Available on crate feature
std only.Source§impl Matrix<3, 3, f64>
impl Matrix<3, 3, f64>
pub fn rotated_x<T: ToF64 + Copy>(angle: T) -> Self
Available on crate feature
std only.pub fn rotate_x<T: ToF64 + Copy>(&self, angle: T) -> Self
Available on crate feature
std only.pub fn rotated_y<T: ToF64 + Copy>(angle: T) -> Self
Available on crate feature
std only.pub fn rotate_y<T: ToF64 + Copy>(&self, angle: T) -> Self
Available on crate feature
std only.pub fn rotated_z<T: ToF64 + Copy>(angle: T) -> Self
Available on crate feature
std only.pub fn rotate_z<T: ToF64 + Copy>(&self, angle: T) -> Self
Available on crate feature
std only.pub fn rotated_zyx<T: ToF64 + Copy>(x_angle: T, y_angle: T, z_angle: T) -> Self
Available on crate feature
std only.pub fn rotate_zyx<T: ToF64 + Copy>( &self, x_angle: T, y_angle: T, z_angle: T, ) -> Self
Available on crate feature
std only.Trait Implementations§
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default + Add<Output = T>> Add for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default + Add<Output = T>> Add for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Clone + Sized + Copy + Default> Clone for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Clone + Sized + Copy + Default> Clone for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Debug + Sized + Copy + Default> Debug for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Debug + Sized + Copy + Default> Debug for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default> From<&[[T; N]; M]> for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default> From<&[[T; N]; M]> for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default> From<[[T; N]; M]> for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default> From<[[T; N]; M]> for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default> Index<usize> for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default> Index<usize> for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default> IndexMut<usize> for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default> IndexMut<usize> for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, const P: usize, T: Sized + Copy + Default + Add + Mul + AddAssign<<T as Mul<T>>::Output>> Mul<Matrix<N, P, T>> for &Matrix<M, N, T>
impl<const M: usize, const N: usize, const P: usize, T: Sized + Copy + Default + Add + Mul + AddAssign<<T as Mul<T>>::Output>> Mul<Matrix<N, P, T>> for &Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, const P: usize, T: Sized + Copy + Default + Add + Mul + AddAssign<<T as Mul<T>>::Output>> Mul<Matrix<N, P, T>> for &mut Matrix<M, N, T>
impl<const M: usize, const N: usize, const P: usize, T: Sized + Copy + Default + Add + Mul + AddAssign<<T as Mul<T>>::Output>> Mul<Matrix<N, P, T>> for &mut Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, const P: usize, T: Sized + Copy + Default + Add + Mul + AddAssign<<T as Mul<T>>::Output>> Mul<Matrix<N, P, T>> for Matrix<M, N, T>
impl<const M: usize, const N: usize, const P: usize, T: Sized + Copy + Default + Add + Mul + AddAssign<<T as Mul<T>>::Output>> Mul<Matrix<N, P, T>> for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default + Mul<T, Output = T>> Mul<T> for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default + Mul<T, Output = T>> Mul<T> for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: PartialEq + Sized + Copy + Default> PartialEq for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: PartialEq + Sized + Copy + Default> PartialEq for Matrix<M, N, T>
Source§impl<const M: usize, const N: usize, T: Sized + Copy + Default + Add<Output = T> + Mul<T, Output = T> + ToSigned<Output = T>> Sub for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default + Add<Output = T> + Mul<T, Output = T> + ToSigned<Output = T>> Sub for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Copy + Sized + Copy + Default> Copy for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Eq + Sized + Copy + Default> Eq for Matrix<M, N, T>
impl<const M: usize, const N: usize, T: Sized + Copy + Default> StructuralPartialEq for Matrix<M, N, T>
Auto Trait Implementations§
impl<const M: usize, const N: usize, T> Freeze for Matrix<M, N, T>where
T: Freeze,
impl<const M: usize, const N: usize, T> RefUnwindSafe for Matrix<M, N, T>where
T: RefUnwindSafe,
impl<const M: usize, const N: usize, T> Send for Matrix<M, N, T>where
T: Send,
impl<const M: usize, const N: usize, T> Sync for Matrix<M, N, T>where
T: Sync,
impl<const M: usize, const N: usize, T> Unpin for Matrix<M, N, T>where
T: Unpin,
impl<const M: usize, const N: usize, T> UnwindSafe for Matrix<M, N, T>where
T: 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