IMatOps

Description

[StaticTemplate]
interface Tinman.Core.Math.Vectors.IMatOps
<TMatrix val : IMatOps<TMatrix, TVector, TElement>>
<TVector val>
<TElement val>

Derived from

IMatBaseOps
IEquatable<TMatrix>

Extended by

Mat23D struct
Mat23F struct
Mat2D struct
Mat2F struct
Mat3D struct
Mat3F struct
Mat4D struct
Mat4F struct

Defines common operations for square matrix values.

Public / Methods

Equals​Almost


[Pure]
public method EqualsAlmost → (1)

other in : TMatrix

The other matrix.

returns → bool

true if both matrices are similar, false if they are not.

Checks if this matrix and the given one are similar but necessarily equal.

Get​Column


[Pure]
public method GetColumn → (1)

index in : int32

The zero-based column index, see IMatBaseOps.Size.

returns → TVector

The column vector.

Returns a column vector.

Get​Row


[Pure]
public method GetRow → (1)

index in : int32

The zero-based row index, IMatBaseOps.Size.

returns → TVector

The row vector.

Returns a row vector.

Lerp


[Pure]
public method Lerp → (2)

other in : TMatrix

The other matrix.

factor in : TElement

The interpolation factor (0: this, 1: other in).

returns → TMatrix

The resulting matrix.

Performs a component-wise linear interpolation between this matrix and the given one.

Mul

2 overloads


[Pure]
public method Mul1 → (1)

in : TVector

The vector.

returns → TVector

The resulting vector.

Multiplies this matrix (left-side) with the given vector (right-side): result = this * v.


[Pure]
public method Mul2 → (1)

in : TMatrix

The matrix.

returns → TMatrix

The resulting matrix.

Multiplies this matrix (left-side) with the given one (right-side): result = this * m.

To​Array


[Pure]
public method ToArray → (4)

values in : TElement [ ]

[not-null]
The output array.

offset opt : int32 = 0

Offset into values in to top-left matrix element.

strideRow opt : int32 = 0

Array index distance between matrix rows. If 0, IMatBaseOps.Size will be used.

strideCol opt : int32 = 1

Array index distance between matrix columns. If 0, IMatBaseOps.Size will be used

Copies matrix elements to the given array.

The method uses the following indexing scheme to write values to values in:

values[offset + (row - 1) * strideRow + (col - 1) * strideCol := matrix[row, col];

where row and col depict the matrix row and column number (starting at 1).

Public / Attributes

Determinant


public attribute Determinant → (get)

value : TElement

The determinant value.

Returns the determinant of this matrix.

Inverse


public attribute Inverse → (get)

value : TMatrix

The inverse matrix.

Returns the inverse of this matrix.

Transpose


public attribute Transpose → (get)

value : TMatrix

The transposed matrix.

Returns the transpose of this matrix.