Matrix2 class
2D Matrix. Values are stored in column major order.
Constructors
- Matrix2(double arg0, double arg1, double arg2, double arg3)
-
New matrix with specified values.
factory
- Matrix2.columns(Vector2 arg0, Vector2 arg1)
-
Matrix with values from column arguments.
factory
- Matrix2.copy(Matrix2 other)
-
Copies values from
other.factory -
Matrix2.fromList(List<
double> values) -
New matrix from
values.factory - Matrix2.identity()
-
Identity matrix.
factory
- Matrix2.outer(Vector2 u, Vector2 v)
-
Outer product of
uandv.factory - Matrix2.rotation(double radians)
-
Rotation of
radians.factory - Matrix2.zero()
- Zero matrix.
Properties
- dimension → int
-
Dimension of the matrix.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- row0 ↔ Vector2
-
Returns row 0
getter/setter pair
- row1 ↔ Vector2
-
Returns row 1
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- storage → Float32List
-
The components of the matrix.
no setter
Methods
-
absolute(
) → Matrix2 - Returns the component wise absolute value of this.
-
absoluteError(
Matrix2 correct) → double -
Returns absolute error between this and
correct -
add(
Matrix2 o) → void -
Add
oto this. -
clone(
) → Matrix2 - Create a copy of this.
-
copyFromArray(
List< double> array, [int offset = 0]) → void -
Copies elements from
arrayinto this starting atoffset. -
copyInto(
Matrix2 arg) → Matrix2 -
Copy this into
arg. -
copyIntoArray(
List< num> array, [int offset = 0]) → void -
Copies this into
arraystarting atoffset. -
copyInverse(
Matrix2 arg) → double -
Set this matrix to be the inverse of
arg -
determinant(
) → double - Returns the determinant of this matrix.
-
dotColumn(
int j, Vector2 v) → double -
Returns the dot product of column
jandv. -
dotRow(
int i, Vector2 v) → double -
Returns the dot product of row
iandv. -
entry(
int row, int col) → double -
Value at
row,col. -
getColumn(
int column) → Vector2 -
Gets the
columnof the matrix -
getRow(
int row) → Vector2 -
Gets the
rowof the matrix -
index(
int row, int col) → int -
Return index in storage for
row,colvalue. -
infinityNorm(
) → double - Returns infinity norm of the matrix. Used for numerical analysis.
-
invert(
) → double - Invert the matrix. Returns the determinant.
-
multiplied(
Matrix2 arg) → Matrix2 -
Multiply this with
argand return the product. -
multiply(
Matrix2 arg) → void -
Multiply this with
argand store it in this. -
multiplyTranspose(
Matrix2 arg) → void -
Multiply this with a transposed
arg. -
negate(
) → void - Negate this.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
relativeError(
Matrix2 correct) → double -
Returns relative error between this and
correct -
scale(
double scale) → void -
Scale this by
scale. -
scaleAdjoint(
double scale) → void -
Converts into Adjugate matrix and scales by
scale -
scaled(
double scale) → Matrix2 -
Create a copy of this scaled by
scale. -
setColumn(
int column, Vector2 arg) → void -
Assigns the
columnof the matrixarg -
setColumns(
Vector2 arg0, Vector2 arg1) → void - Sets the entire matrix to the column values.
-
setDiagonal(
Vector2 arg) → void -
Sets the diagonal of the matrix to be
arg. -
setEntry(
int row, int col, double v) → void -
Set value at
row,colto bev. -
setFrom(
Matrix2 arg) → void -
Sets the entire matrix to the matrix in
arg. -
setIdentity(
) → void - Makes this into the identity matrix.
-
setOuter(
Vector2 u, Vector2 v) → void -
Set this to the outer product of
uandv. -
setRotation(
double radians) → void -
Turns the matrix into a rotation of
radians -
setRow(
int row, Vector2 arg) → void -
Sets
rowof the matrix to values inarg -
setValues(
double arg0, double arg1, double arg2, double arg3) → void - Sets the matrix with specified values.
-
setZero(
) → void - Zeros this.
-
splatDiagonal(
double arg) → void -
Sets the diagonal to
arg. -
sub(
Matrix2 o) → void -
Subtract
ofrom this. -
toString(
) → String -
Returns a printable string
override
-
trace(
) → double - Trace of the matrix.
-
transform(
Vector2 arg) → Vector2 -
Transform
argof type Vector2 using the transformation defined by this. -
transformed(
Vector2 arg, [Vector2? out]) → Vector2 -
Transform a copy of
argof type Vector2 using the transformation defined by this. If aoutparameter is supplied, the copy is stored inout. -
transpose(
) → void -
transposed(
) → Matrix2 - Returns the tranpose of this.
-
transposeMultiply(
Matrix2 arg) → void -
Multiply a transposed this with
arg.
Operators
-
operator *(
dynamic arg) → dynamic -
Returns a new vector or matrix by multiplying this with
arg. -
operator +(
Matrix2 arg) → Matrix2 -
Returns new matrix after component wise this +
arg -
operator -(
Matrix2 arg) → Matrix2 -
Returns new matrix after component wise this -
arg -
operator ==(
Object other) → bool -
Check if two matrices are the same.
override
-
operator [](
int i) → double -
Access the element of the matrix at the index
i. -
operator []=(
int i, double v) → void -
Set the element of the matrix at the index
i. -
operator unary-(
) → Matrix2 - Returns new matrix -this