Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
Loading...
Searching...
No Matches
Matrix2 Struct Reference

#include <definitions.hpp>

Public Member Functions

Matrix2 operator* (const Matrix2 &other) const
 
Vector2 operator* (const Vector2 &other) const
 
Matrix2 operator+ (const Matrix2 &other) const
 
Matrix2 operator- (const Matrix2 &other) const
 
Matrix2 operator/ (float scalar) const
 
template<class Archive >
void serialize (Archive &ar)
 

Static Public Member Functions

static Matrix2 rotation (float angle)
 
static Matrix2 scale (Vector2 s)
 

Public Attributes

float m [2][2]
 

Detailed Description

Matrix2 struct

Also known as the bane of my existence :)

You can multiply them together, multiply with a Vector2, subtract, divide and add them. You can also create rotation and scale matrices with the static functions.

Member Function Documentation

◆ operator*() [1/2]

Matrix2 Matrix2::operator* ( const Matrix2 other) const

◆ operator*() [2/2]

Vector2 Matrix2::operator* ( const Vector2 other) const

◆ operator+()

Matrix2 Matrix2::operator+ ( const Matrix2 other) const

◆ operator-()

Matrix2 Matrix2::operator- ( const Matrix2 other) const

◆ operator/()

Matrix2 Matrix2::operator/ ( float  scalar) const

◆ rotation()

Matrix2 Matrix2::rotation ( float  angle)
static

◆ scale()

Matrix2 Matrix2::scale ( Vector2  s)
static

◆ serialize()

template<class Archive >
void Matrix2::serialize ( Archive &  ar)
inline

Member Data Documentation

◆ m

float Matrix2::m[2][2]

The documentation for this struct was generated from the following files: