[−][src]Struct nannou::math::Matrix2
A 2 x 2, column major matrix
This type is marked as #[repr(C)]
.
Fields
x: Vector2<S>
The first column of the matrix.
y: Vector2<S>
The second column of the matrix.
Methods
impl<S> Matrix2<S>
[src]
pub const fn new(c0r0: S, c0r1: S, c1r0: S, c1r1: S) -> Matrix2<S>
[src]
Create a new matrix, providing values for each index.
pub const fn from_cols(c0: Vector2<S>, c1: Vector2<S>) -> Matrix2<S>
[src]
Create a new matrix, providing columns.
impl<S> Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
pub fn look_at(dir: Vector2<S>, up: Vector2<S>) -> Matrix2<S>
[src]
Create a transformation matrix that will cause a vector to point at
dir
, using up
for orientation.
pub fn from_angle<A>(theta: A) -> Matrix2<S> where
A: Into<Rad<S>>,
[src]
A: Into<Rad<S>>,
pub fn is_finite(&self) -> bool
[src]
Are all entries in the matrix finite.
impl<S> Matrix2<S> where
S: Copy + NumCast,
[src]
S: Copy + NumCast,
pub fn cast<T>(&self) -> Option<Matrix2<T>> where
T: NumCast,
[src]
T: NumCast,
Component-wise casting to another type
Trait Implementations
impl<S> AbsDiffEq<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Epsilon = <S as AbsDiffEq<S>>::Epsilon
Used for specifying relative comparisons.
fn default_epsilon() -> <S as AbsDiffEq<S>>::Epsilon
[src]
fn abs_diff_eq(
&self,
other: &Matrix2<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon
) -> bool
[src]
&self,
other: &Matrix2<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon
) -> bool
fn abs_diff_ne(&self, other: &Rhs, epsilon: Self::Epsilon) -> bool
impl<'a, 'b, S> Add<&'a Matrix2<S>> for &'b Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the +
operator.
fn add(self, other: &'a Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Add<&'a Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the +
operator.
fn add(self, other: &'a Matrix2<S>) -> Matrix2<S>
[src]
impl<S> Add<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the +
operator.
fn add(self, other: Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Add<Matrix2<S>> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the +
operator.
fn add(self, other: Matrix2<S>) -> Matrix2<S>
[src]
impl<S> AddAssign<Matrix2<S>> for Matrix2<S> where
S: BaseFloat + AddAssign<S>,
[src]
S: BaseFloat + AddAssign<S>,
fn add_assign(&mut self, other: Matrix2<S>)
[src]
impl<S> AsMut<[[S; 2]; 2]> for Matrix2<S>
[src]
impl<S> AsMut<[S; 4]> for Matrix2<S>
[src]
impl<S> AsRef<[[S; 2]; 2]> for Matrix2<S>
[src]
impl<S> AsRef<[S; 4]> for Matrix2<S>
[src]
impl<S> AsRef<Matrix2<S>> for Basis2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
impl<S> Clone for Matrix2<S> where
S: Clone,
[src]
S: Clone,
impl<S> Copy for Matrix2<S> where
S: Copy,
[src]
S: Copy,
impl<S> Debug for Matrix2<S> where
S: Debug,
[src]
S: Debug,
impl<'de, S> Deserialize<'de> for Matrix2<S> where
S: Deserialize<'de>,
[src]
S: Deserialize<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Matrix2<S>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<Matrix2<S>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl<S> Div<S> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the /
operator.
fn div(self, other: S) -> Matrix2<S>
[src]
impl<'a, S> Div<S> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the /
operator.
fn div(self, other: S) -> Matrix2<S>
[src]
impl<S> DivAssign<S> for Matrix2<S> where
S: BaseFloat + DivAssign<S>,
[src]
S: BaseFloat + DivAssign<S>,
fn div_assign(&mut self, scalar: S)
[src]
impl<'a, S> From<&'a [[S; 2]; 2]> for &'a Matrix2<S>
[src]
impl<'a, S> From<&'a [S; 4]> for &'a Matrix2<S>
[src]
impl<'a, S> From<&'a mut [[S; 2]; 2]> for &'a mut Matrix2<S>
[src]
impl<'a, S> From<&'a mut [S; 4]> for &'a mut Matrix2<S>
[src]
impl<S> From<[[S; 2]; 2]> for Matrix2<S> where
S: Copy,
[src]
S: Copy,
impl<S> From<Basis2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
impl<S> From<Matrix2<S>> for Matrix3<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(m: Matrix2<S>) -> Matrix3<S>
[src]
Clone the elements of a 2-dimensional matrix into the top-left corner of a 3-dimensional identity matrix.
impl<S> From<Matrix2<S>> for Matrix4<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn from(m: Matrix2<S>) -> Matrix4<S>
[src]
Clone the elements of a 2-dimensional matrix into the top-left corner of a 4-dimensional identity matrix.
impl<S> Index<usize> for Matrix2<S>
[src]
type Output = Vector2<S>
The returned type after indexing.
fn index(&'a self, i: usize) -> &'a Vector2<S>
[src]
impl<S> IndexMut<usize> for Matrix2<S>
[src]
impl<S> Into<[[S; 2]; 2]> for Matrix2<S>
[src]
impl<S> Matrix for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Column = Vector2<S>
The column vector of the matrix.
type Row = Vector2<S>
The row vector of the matrix.
type Transpose = Matrix2<S>
The result of transposing the matrix
fn row(&self, r: usize) -> Vector2<S>
[src]
fn swap_rows(&mut self, a: usize, b: usize)
[src]
fn swap_columns(&mut self, a: usize, b: usize)
[src]
fn swap_elements(&mut self, a: (usize, usize), b: (usize, usize))
[src]
fn transpose(&self) -> Matrix2<S>
[src]
fn as_ptr(&self) -> *const Self::Scalar
[src]
fn as_mut_ptr(&mut self) -> *mut Self::Scalar
[src]
fn replace_col(&mut self, c: usize, src: Self::Column) -> Self::Column
[src]
impl<'a, 'b, S> Mul<&'a Matrix2<S>> for &'b Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Mul<&'a Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Mul<&'a Vector2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector2<S>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector2<S>) -> Vector2<S>
[src]
impl<'a, 'b, S> Mul<&'a Vector2<S>> for &'b Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector2<S>
The resulting type after applying the *
operator.
fn mul(self, other: &'a Vector2<S>) -> Vector2<S>
[src]
impl<S> Mul<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the *
operator.
fn mul(self, other: Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Mul<Matrix2<S>> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the *
operator.
fn mul(self, other: Matrix2<S>) -> Matrix2<S>
[src]
impl<S> Mul<S> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the *
operator.
fn mul(self, other: S) -> Matrix2<S>
[src]
impl<'a, S> Mul<S> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the *
operator.
fn mul(self, other: S) -> Matrix2<S>
[src]
impl<'a, S> Mul<Vector2<S>> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector2<S>
The resulting type after applying the *
operator.
fn mul(self, other: Vector2<S>) -> Vector2<S>
[src]
impl<S> Mul<Vector2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Vector2<S>
The resulting type after applying the *
operator.
fn mul(self, other: Vector2<S>) -> Vector2<S>
[src]
impl<S> MulAssign<S> for Matrix2<S> where
S: BaseFloat + MulAssign<S>,
[src]
S: BaseFloat + MulAssign<S>,
fn mul_assign(&mut self, scalar: S)
[src]
impl<'a, S> Neg for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the -
operator.
fn neg(self) -> Matrix2<S>
[src]
impl<S> Neg for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the -
operator.
fn neg(self) -> Matrix2<S>
[src]
impl<S> One for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn one() -> Matrix2<S>
[src]
fn set_one(&mut self)
[src]
fn is_one(&self) -> bool where
Self: PartialEq<Self>,
[src]
Self: PartialEq<Self>,
impl<S> PartialEq<Matrix2<S>> for Matrix2<S> where
S: PartialEq<S>,
[src]
S: PartialEq<S>,
impl<'a, S> Product<&'a Matrix2<S>> for Matrix2<S> where
S: 'a + BaseFloat,
[src]
S: 'a + BaseFloat,
impl<S> Product<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
impl<S> RelativeEq<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn default_max_relative() -> <S as AbsDiffEq<S>>::Epsilon
[src]
fn relative_eq(
&self,
other: &Matrix2<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_relative: <S as AbsDiffEq<S>>::Epsilon
) -> bool
[src]
&self,
other: &Matrix2<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_relative: <S as AbsDiffEq<S>>::Epsilon
) -> bool
fn relative_ne(
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
&self,
other: &Rhs,
epsilon: Self::Epsilon,
max_relative: Self::Epsilon
) -> bool
impl<S> Rem<S> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the %
operator.
fn rem(self, other: S) -> Matrix2<S>
[src]
impl<'a, S> Rem<S> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the %
operator.
fn rem(self, other: S) -> Matrix2<S>
[src]
impl<S> RemAssign<S> for Matrix2<S> where
S: BaseFloat + RemAssign<S>,
[src]
S: BaseFloat + RemAssign<S>,
fn rem_assign(&mut self, scalar: S)
[src]
impl<S> Serialize for Matrix2<S> where
S: Serialize,
[src]
S: Serialize,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl<S> SquareMatrix for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type ColumnRow = Vector2<S>
The row/column vector of the matrix. Read more
fn from_value(value: S) -> Matrix2<S>
[src]
fn from_diagonal(value: Vector2<S>) -> Matrix2<S>
[src]
fn transpose_self(&mut self)
[src]
fn determinant(&self) -> S
[src]
fn diagonal(&self) -> Vector2<S>
[src]
fn invert(&self) -> Option<Matrix2<S>>
[src]
fn is_diagonal(&self) -> bool
[src]
fn is_symmetric(&self) -> bool
[src]
fn identity() -> Self
[src]
fn trace(&self) -> Self::Scalar
[src]
fn is_invertible(&self) -> bool
[src]
fn is_identity(&self) -> bool
[src]
impl<S> StructuralPartialEq for Matrix2<S>
[src]
impl<'a, 'b, S> Sub<&'a Matrix2<S>> for &'b Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the -
operator.
fn sub(self, other: &'a Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Sub<&'a Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the -
operator.
fn sub(self, other: &'a Matrix2<S>) -> Matrix2<S>
[src]
impl<'a, S> Sub<Matrix2<S>> for &'a Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the -
operator.
fn sub(self, other: Matrix2<S>) -> Matrix2<S>
[src]
impl<S> Sub<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
type Output = Matrix2<S>
The resulting type after applying the -
operator.
fn sub(self, other: Matrix2<S>) -> Matrix2<S>
[src]
impl<S> SubAssign<Matrix2<S>> for Matrix2<S> where
S: BaseFloat + SubAssign<S>,
[src]
S: BaseFloat + SubAssign<S>,
fn sub_assign(&mut self, other: Matrix2<S>)
[src]
impl<'a, S> Sum<&'a Matrix2<S>> for Matrix2<S> where
S: 'a + BaseFloat,
[src]
S: 'a + BaseFloat,
impl<S> Sum<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
impl<S> UlpsEq<Matrix2<S>> for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
fn default_max_ulps() -> u32
[src]
fn ulps_eq(
&self,
other: &Matrix2<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_ulps: u32
) -> bool
[src]
&self,
other: &Matrix2<S>,
epsilon: <S as AbsDiffEq<S>>::Epsilon,
max_ulps: u32
) -> bool
fn ulps_ne(&self, other: &Rhs, epsilon: Self::Epsilon, max_ulps: u32) -> bool
impl<S> VectorSpace for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
impl<S> Zero for Matrix2<S> where
S: BaseFloat,
[src]
S: BaseFloat,
Auto Trait Implementations
impl<S> RefUnwindSafe for Matrix2<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for Matrix2<S> where
S: Send,
S: Send,
impl<S> Sync for Matrix2<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Matrix2<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Matrix2<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
fn convert_into(self) -> U
[src]
fn convert_unclamped_into(self) -> U
[src]
fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Rhs> NumAssignOps<Rhs> for T where
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
[src]
T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> One for T where
T: One,
T: One,
fn one() -> T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T> Style for T where
T: Any + Debug + PartialEq<T>,
[src]
T: Any + Debug + PartialEq<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Zero for T where
T: Zero,
T: Zero,