Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.eside.flingbox.math
Class Matrix22

    java.lang.Object
      edu.eside.flingbox.math.Matrix22

    public class Matrix22

extends java.lang.Object

Basic 2x2 matrix implementation This will be used to storage rotational matrix

Field Summary
`float[]` | `values` Matrix values

Constructor Summary
`Matrix22()` Creates zero matrix
`Matrix22(float angle)` Constructor for a Rotation matrix
`Matrix22(float[] m)` Creates matrix with values

Method Summary
`float` | `determinant()` Computes determinant
`Matrix22` | `invert()` Computes matrix invert
`static Matrix22` | `invert(Matrix22 m)` Computes matrix invert
`java.lang.String` | `toString()` Return a string representing the matrix
`Matrix22` | `transpose()` Transposes matrix
`static Matrix22` | `transpose(Matrix22 m)` Creates the transpose of the matrix

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### values

    public float[] values

  Matrix values

Constructor Detail

### Matrix22

    public Matrix22()

  Creates zero matrix

### Matrix22

    public Matrix22(float[] m)

  Creates matrix with values

  Parameters:
    `m` - Values. should have 4 members

### Matrix22

    public Matrix22(float angle)

  Constructor for a Rotation matrix

  Parameters:
    `angle` - Angle for rotation

Method Detail

### transpose

    public static Matrix22 transpose(Matrix22 m)

  Creates the transpose of the matrix

  Returns:
    New resulting matrix

### transpose

    public Matrix22 transpose()

  Transposes matrix

  Returns:
    current matrix

### invert

    public static Matrix22 invert(Matrix22 m)

  Computes matrix invert

  Returns:
    New matrix with inverted current matrix or null if determinant is Zero

### invert

    public Matrix22 invert()

  Computes matrix invert

  Returns:
    Current matrix with inverted current matrix or null if determinant is Zero

### determinant

    public float determinant()

  Computes determinant

  Returns:
    determinant

### toString

    public java.lang.String toString()

  Return a string representing the matrix

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD