java.lang.Object
org.spongepowered.math.matrix.Matrix2d
- All Implemented Interfaces:
Serializable
,Matrixd
A 2x2 matrix containing values of type
double
.`- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabs()
ceil()
column
(int col) static Matrix2d
createRotation
(Complexd rot) static Matrix2d
createScaling
(double scale) static Matrix2d
createScaling
(double x, double y) static Matrix2d
createScaling
(float scale) static Matrix2d
createScaling
(float x, float y) static Matrix2d
static Matrix2d
createTranslation
(double x) static Matrix2d
createTranslation
(float x) double
div
(double a) div
(float a) boolean
floor()
static Matrix2d
from
(double n) static Matrix2d
from
(double m00, double m01, double m10, double m11) static Matrix2d
fromDiagonal
(double m00, double m11) double
get
(int row, int col) int
hashCode()
invert()
mul
(double a) mul
(float a) negate()
pow
(double pow) pow
(float pow) round()
row
(int row) scale
(double scale) scale
(double x, double y) scale
(float scale) scale
(float x, float y) double[]
toArray()
double[]
toArray
(boolean columnMajor) toDouble()
toFloat()
toString()
double
trace()
transform
(double x, double y) transform
(float x, float y) translate
(double x) translate
(float x)
-
Field Details
-
ZERO
-
IDENTITY
-
-
Constructor Details
-
Matrix2d
-
Matrix2d
-
Matrix2d
-
Matrix2d
public Matrix2d(float m00, float m01, float m10, float m11) -
Matrix2d
public Matrix2d(double m00, double m01, double m10, double m11)
-
-
Method Details
-
get
public double get(int row, int col) -
row
-
column
-
add
-
sub
-
mul
-
mul
-
mul
-
div
-
div
-
div
-
pow
-
pow
-
translate
-
translate
-
scale
-
scale
-
scale
-
scale
-
scale
-
rotate
-
transform
-
transform
-
transform
-
floor
-
ceil
-
round
-
abs
-
negate
-
transpose
-
trace
public double trace() -
determinant
public double determinant()- Specified by:
determinant
in interfaceMatrixd
-
invert
-
toMatrix3
-
toMatrix4
-
toMatrixN
-
toArray
public double[] toArray() -
toArray
public double[] toArray(boolean columnMajor) -
toFloat
-
toDouble
-
toString
-
equals
-
hashCode
public int hashCode() -
from
-
from
-
fromDiagonal
-
createScaling
-
createScaling
-
createScaling
-
createScaling
-
createScaling
-
createTranslation
-
createTranslation
-
createRotation
-