Struct glm::Matrix2
[−]
[src]
#[repr(C)]pub struct Matrix2<T: BaseFloat> { pub c0: Vector2<T>, pub c1: Vector2<T>, }
Fields
c0: Vector2<T>
c1: Vector2<T>
Methods
impl<T: BaseFloat> Matrix2<T>
[src]
fn new(c0: Vector2<T>, c1: Vector2<T>) -> Matrix2<T>
fn from_array(ary: &[Vector2<T>; 2]) -> &Matrix2<T>
fn from_array_mut(ary: &mut [Vector2<T>; 2]) -> &mut Matrix2<T>
fn as_array(&self) -> &[Vector2<T>; 2]
fn as_array_mut(&mut self) -> &mut [Vector2<T>; 2]
fn add_s(&self, rhs: T) -> Matrix2<T>
fn add_m(&self, rhs: &Matrix2<T>) -> Matrix2<T>
fn sub_s(&self, rhs: T) -> Matrix2<T>
fn sub_m(&self, rhs: &Matrix2<T>) -> Matrix2<T>
fn div_m(&self, rhs: &Matrix2<T>) -> Matrix2<T>
fn div_s(&self, rhs: T) -> Matrix2<T>
fn rem_m(&self, rhs: &Matrix2<T>) -> Matrix2<T>
fn rem_s(&self, rhs: T) -> Matrix2<T>
fn mul_s(&self, rhs: T) -> Matrix2<T>
fn mul_v(&self, rhs: &Vector2<T>) -> Vector2<T>
fn mul_m(&self, rhs: &Matrix2<T>) -> Matrix2<T>
fn neg_m(&self) -> Matrix2<T>
impl<T: BaseFloat> Matrix2<T>
[src]
fn extend(&self, z: Vector2<T>) -> Matrix3x2<T>
Extends self to a Matrix3x2
by appending the column vector z
.
Example
use glm::*; let m2 = mat2(1., 2., 3., 4.); let m3x2 = mat3x2(1., 2., 3., 4., 0., 0.); assert_eq!(m2.extend(vec2(0., 0.)), m3x2);
Trait Implementations
impl<T: Copy + BaseFloat> Copy for Matrix2<T>
[src]
impl<T: Clone + BaseFloat> Clone for Matrix2<T>
[src]
fn clone(&self) -> Matrix2<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: PartialEq + BaseFloat> PartialEq for Matrix2<T>
[src]
fn eq(&self, __arg_0: &Matrix2<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Matrix2<T>) -> bool
This method tests for !=
.
impl<T: Debug + BaseFloat> Debug for Matrix2<T>
[src]
impl<T: BaseFloat> Index<usize> for Matrix2<T>
[src]
type Output = Vector2<T>
The returned type after indexing
fn index<'a>(&'a self, i: usize) -> &'a Vector2<T>
The method for the indexing (container[index]
) operation
impl<T: BaseFloat> IndexMut<usize> for Matrix2<T>
[src]
fn index_mut<'a>(&'a mut self, i: usize) -> &'a mut Vector2<T>
The method for the mutable indexing (container[index]
) operation
impl<T: BaseFloat> Rand for Matrix2<T>
[src]
fn rand<R: Rng>(rng: &mut R) -> Matrix2<T>
Generates a random instance of this type using the specified source of randomness. Read more
impl<T: BaseFloat> Add<T> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the +
operator
fn add(self, rhs: T) -> Matrix2<T>
The method for the +
operator
impl<T: BaseFloat> ApproxEq for Matrix2<T>
[src]
type BaseType = T
fn is_close_to(&self, rhs: &Matrix2<T>, max_diff: T) -> bool
Returns true
if the difference between x
and y
is less than max_diff
. Read more
fn is_approx_eq(&self, rhs: &Self) -> bool
Returns true
if the difference between x
and y
is less than machine epsilon. Read more
impl<T: BaseFloat> Add<Matrix2<T>> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the +
operator
fn add(self, rhs: Matrix2<T>) -> Matrix2<T>
The method for the +
operator
impl<T: BaseFloat> Sub<T> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: T) -> Matrix2<T>
The method for the -
operator
impl<T: BaseFloat> Sub<Matrix2<T>> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: Matrix2<T>) -> Matrix2<T>
The method for the -
operator
impl<T: BaseFloat> Div<T> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Matrix2<T>
The method for the /
operator
impl<T: BaseFloat> Div<Matrix2<T>> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the /
operator
fn div(self, rhs: Matrix2<T>) -> Matrix2<T>
The method for the /
operator
impl<T: BaseFloat> Rem<T> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the %
operator
fn rem(self, rhs: T) -> Matrix2<T>
The method for the %
operator
impl<T: BaseFloat> Rem<Matrix2<T>> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the %
operator
fn rem(self, rhs: Matrix2<T>) -> Matrix2<T>
The method for the %
operator
impl<T: BaseFloat> Neg for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the -
operator
fn neg(self) -> Matrix2<T>
The method for the unary -
operator
impl<T: BaseFloat> Mul<T> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Matrix2<T>
The method for the *
operator
impl<T: BaseFloat> Mul<Vector2<T>> for Matrix2<T>
[src]
type Output = Vector2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Vector2<T>) -> Vector2<T>
The method for the *
operator
impl<T: BaseFloat> Mul<Matrix2<T>> for Matrix2<T>
[src]
type Output = Matrix2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Matrix2<T>) -> Matrix2<T>
The method for the *
operator
impl<T: BaseFloat> Zero for Matrix2<T>
[src]
fn zero() -> Matrix2<T>
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl<T: BaseFloat> GenMat<T, Vector2<T>> for Matrix2<T>
[src]
type R = Vector2<T>
Type of row vectors.
type Transpose = Matrix2<T>
Type of transpose matrix.
fn transpose(&self) -> Matrix2<T>
Returns the transpose matrix. Read more
fn mul_c(&self, rhs: &Matrix2<T>) -> Matrix2<T>
Component-wise multiplication. Read more
impl<T: BaseFloat> Mul<Matrix3x2<T>> for Matrix2<T>
[src]
type Output = Matrix3x2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Matrix3x2<T>) -> Matrix3x2<T>
The method for the *
operator
impl<T: BaseFloat> Mul<Matrix4x2<T>> for Matrix2<T>
[src]
type Output = Matrix4x2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Matrix4x2<T>) -> Matrix4x2<T>
The method for the *
operator