pub struct Matrix2x2 {
    pub data: [Fraction; 4],
}

Fields

data: [Fraction; 4]

The matrix data.

Trait Implementations

The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more

Generates a new Matrix2x2 with values 0.

Generates a new Matrix2x2 from the Fraction specified.

Generates a new Matrix2x2 from a list of Fraction values.

Scales the given Matrix2x2 by the given Fraction.

Calculates the determinant of the Matrix2x2 and returns it, a Fraction.

Transposes the Matrix2x2 and returns the result.

Returns the cofactor of the Matrix2x2.

Returns the adjugate of the Matrix2x2. Equal to calling cofactor() and then transpose().

Returns a Result<Matrix2x2, ZeroDeterminantError>. It returns an Result<Matrix2x2, ZeroDeterminantError> because there won’t always be an inverse (if the determinant is 0), hence requires some extra checking.

Panics

Panics when trying to unwrap() a None-value.

The type of data the matrix holds.
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.