Package eu.webtoolkit.jwt
Class Matrix2f
java.lang.Object
eu.webtoolkit.jwt.Matrix2f
A single precision floating point 2 by 2 matrix. Primarily to support 3D rotations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getElement
(int row, int column) Retrieves the value at the specified row and column of this matrix.void
setElement
(int row, int column, float value) Sets the specified element of this matrix4f to the value provided.toString()
void
Sets the value of this matrix to the transpose of the argument matrix.
-
Constructor Details
-
Matrix2f
public Matrix2f()Constructs and initializes a Matrix2f to all zeros.
-
-
Method Details
-
getElement
public float getElement(int row, int column) Retrieves the value at the specified row and column of this matrix.- Parameters:
row
- the row number to be retrieved (zero indexed)column
- the column number to be retrieved (zero indexed)- Returns:
- the value at the indexed element
-
setElement
public void setElement(int row, int column, float value) Sets the specified element of this matrix4f to the value provided.- Parameters:
row
- the row number to be modified (zero indexed)column
- the column number to be modified (zero indexed)value
- the new value
-
transpose
Sets the value of this matrix to the transpose of the argument matrix.- Parameters:
m1
- the matrix to be transposed
-
toString
-