26 lines
606 B
C++
26 lines
606 B
C++
#pragma once
|
|
|
|
#include <J3ML/LinearAlgebra.h>
|
|
#include <J3ML/LinearAlgebra/Vector2.h>
|
|
|
|
namespace LinearAlgebra {
|
|
class Matrix2x2 {
|
|
public:
|
|
enum { Rows = 3 };
|
|
enum { Cols = 3 };
|
|
static const Matrix2x2 Zero;
|
|
static const Matrix2x2 Identity;
|
|
static const Matrix2x2 NaN;
|
|
|
|
Vector2 GetRow(int index) const;
|
|
Vector2 GetColumn(int index) const;
|
|
float At(int x, int y) const;
|
|
|
|
|
|
Vector2 operator * (const Vector2& rhs) const;
|
|
Matrix2x2 operator * (const Matrix2x2 &rhs) const;
|
|
|
|
protected:
|
|
float elems[2][2];
|
|
};
|
|
} |