pub struct Matrix4x4 {
    pub data: [Fraction; 16],
}

Fields§

§data: [Fraction; 16]

The matrix data.

Implementations§

Generates a new Matrix4x4 with values 0.

Generates a new Matrix4x4 from the Fraction specified.

Generates a new Matrix4x4 from a list of Fraction values.

Scales the given Matrix4x4 by the given Fraction.

Transposes the Matrix4x4 and returns the result.

Returns the cofactor of the Matrix4x4.

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

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

Returns an Option<Matrix4x4>. It returns an Option<Matrix4x4> 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.

Transforms a Vector3D with the Matrix4x4 and returns the result, a Vector3D.

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
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.