Matrix Math

class Mat2

This class implements a 2x2 real-valued matrix. Individual elements are represented with double precision floating point numbers. To use the Mat2 class you must include the header

    #include <gfx/mat2.h>

Constructor Methods

The Mat2 class defines the following set of constructors:

    // Initialize all elements to 0
    Mat2();
    
    // Initialize row 0 to [a b] and row 1 to [c d]
    Mat2(double a, double b, double c, double d);
    
    // Initialize rows with given vectors
    Mat2(const Vec2 &r0,const Vec2 &r1);

    // Copy values from A
    Mat2(const Mat2 &A);