Module org.dyn4j

Class Matrix22


  • public class Matrix22
    extends java.lang.Object
    Represents a 2x2 Matrix.

    Used to solve 2x2 systems of equations.

    Since:
    1.0.0
    Version:
    3.4.0
    Author:
    William Bittle
    • Field Detail

      • m00

        public double m00
        The element at 0,0
      • m01

        public double m01
        The element at 0,1
      • m10

        public double m10
        The element at 1,0
      • m11

        public double m11
        The element at 1,1
    • Constructor Detail

      • Matrix22

        public Matrix22()
        Default constructor.
      • Matrix22

        public Matrix22​(double m00,
                        double m01,
                        double m10,
                        double m11)
        Full constructor.
        Parameters:
        m00 - the element at 0,0
        m01 - the element at 0,1
        m10 - the element at 1,0
        m11 - the element at 1,1
      • Matrix22

        public Matrix22​(double[] values)
        Full constructor.

        The given array should be in the same order as the Matrix22(double, double, double, double) constructor.

        Parameters:
        values - the values array
        Throws:
        java.lang.NullPointerException - if values is null
        java.lang.IllegalArgumentException - if values is not of length 4
      • Matrix22

        public Matrix22​(Matrix22 matrix)
        Copy constructor.
        Parameters:
        matrix - the Matrix22 to copy