java.lang.Object
omix.util.math.vector.Matrix2f
public class Matrix2f extends Object
This class is a 2 × 2 matrix with double precision.
- Author:
- Dr. Peter Droste, Omix Visualization
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Vec2f
diag()
Returns the diagonal of the matrix as vectorMatrix2f
dot(float a)
ScaleMatrix2f
dot(Matrix2f matrix)
Scalar productVec2f
dot(Vec2f vector)
Product with a vector.float
get(int i, int j)
Returns the value of the matrix index (i,j).Matrix2f
plus(Matrix2f matrix)
Additionvoid
set(int i, int j, float value)
Sets the value of the matrix index (i,j).String
toString()
Matrix2f
transponate()
Transponates the matrix.
-
Constructor Details
-
Method Details
-
transponate
Transponates the matrix.- Returns:
- thisT
-
dot
Scalar product- Parameters:
matrix
-- Returns:
- this⋅matrix
-
set
public void set(int i, int j, float value)Sets the value of the matrix index (i,j).- Parameters:
i
-j
-value
-
-
get
public float get(int i, int j)Returns the value of the matrix index (i,j).- Parameters:
i
-j
-- Returns:
- value at i,j
-
plus
Addition- Parameters:
matrix
-- Returns:
- this + matrix
-
dot
Scale- Parameters:
a
-- Returns:
- this⋅a
-
dot
Product with a vector.- Parameters:
vector
-- Returns:
- this⋅vector
-
diag
Returns the diagonal of the matrix as vector- Returns:
- the diagonal of the matrix as vector
-
toString
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-