14 return {t00, t01, t10, t11};
42 const auto s =
sin(a);
43 const auto c =
cos(a);
55 #define OP(i) data[i] += rhs.data[i]
65 #define OP(i) data[i] -= rhs.data[i]
89 return data[col * 2 + row];
96 return {
get(0, c),
get(1, c)};
103 return {
get(r, 0),
get(r, 1)};
109 return fmt::format(
"({}, {})", m.get_row(0), m.get_row(1));
133 const auto x = lhs.
x * rhs.
x;
134 const auto y = lhs.
y * rhs.
y;
141 get_component_multiply_sum(lhs.get_row(r), rhs.get_column(c))
153 #define OP(r) get_component_multiply_sum(lhs.get_row(r), rhs)
154 return {
OP(0),
OP(1)};
Angle operator+(const Angle &lhs, const Angle &rhs)
Angle operator-(const Angle &lhs, const Angle &rhs)
std::string to_string(const Aabb &a)
float cos(const Angle &ang)
float sin(const Angle &ang)
Angle operator*(const Angle &lhs, float rhs)
float get_component_multiply_sum(const vec2f &lhs, const vec2f &rhs)
static mat2f from_stretch_y(float k)
static mat2f from_stretch_x(float k)
void operator-=(const mat2f &rhs)
static mat2f from_rotation(const Angle &a)
vec2f get_column(int c) const
vec2f get_row(int r) const
float get(int row, int col) const
void operator+=(const mat2f &rhs)
static mat2f from_col_major(float t00, float t01, float t10, float t11)
constexpr static mat2f from_row_major(float t00, float t10, float t01, float t11)