mirror of
https://github.com/thunderbrewhq/typhoon.git
synced 2025-12-12 02:22:30 +00:00
feat(matrix): add C44Matrix
This commit is contained in:
parent
51ccc49265
commit
2e64cb75da
3 changed files with 55 additions and 0 deletions
6
tempest/Matrix.hpp
Normal file
6
tempest/Matrix.hpp
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#ifndef TEMPEST_MATRIX_HPP
|
||||||
|
#define TEMPEST_MATRIX_HPP
|
||||||
|
|
||||||
|
#include "tempest/matrix/C44Matrix.hpp"
|
||||||
|
|
||||||
|
#endif
|
||||||
25
tempest/matrix/C44Matrix.hpp
Normal file
25
tempest/matrix/C44Matrix.hpp
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
#ifndef TEMPEST_MATRIX_C_44MATRIX_HPP
|
||||||
|
#define TEMPEST_MATRIX_C_44MATRIX_HPP
|
||||||
|
|
||||||
|
class C44Matrix {
|
||||||
|
public:
|
||||||
|
// Member variables
|
||||||
|
float a0 = 1.0f;
|
||||||
|
float a1 = 0.0f;
|
||||||
|
float a2 = 0.0f;
|
||||||
|
float a3 = 0.0f;
|
||||||
|
float b0 = 0.0f;
|
||||||
|
float b1 = 1.0f;
|
||||||
|
float b2 = 0.0f;
|
||||||
|
float b3 = 0.0f;
|
||||||
|
float c0 = 0.0f;
|
||||||
|
float c1 = 0.0f;
|
||||||
|
float c2 = 1.0f;
|
||||||
|
float c3 = 0.0f;
|
||||||
|
float d0 = 0.0f;
|
||||||
|
float d1 = 0.0f;
|
||||||
|
float d2 = 0.0f;
|
||||||
|
float d3 = 1.0f;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
24
test/Matrix.cpp
Normal file
24
test/Matrix.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include "tempest/Matrix.hpp"
|
||||||
|
#include "test/Test.hpp"
|
||||||
|
|
||||||
|
TEST_CASE("C44Matrix", "[matrix]") {
|
||||||
|
SECTION("constructs with default constructor") {
|
||||||
|
C44Matrix matrix;
|
||||||
|
REQUIRE(matrix.a0 == 1.0f);
|
||||||
|
REQUIRE(matrix.a1 == 0.0f);
|
||||||
|
REQUIRE(matrix.a2 == 0.0f);
|
||||||
|
REQUIRE(matrix.a3 == 0.0f);
|
||||||
|
REQUIRE(matrix.b0 == 0.0f);
|
||||||
|
REQUIRE(matrix.b1 == 1.0f);
|
||||||
|
REQUIRE(matrix.b2 == 0.0f);
|
||||||
|
REQUIRE(matrix.b3 == 0.0f);
|
||||||
|
REQUIRE(matrix.c0 == 0.0f);
|
||||||
|
REQUIRE(matrix.c1 == 0.0f);
|
||||||
|
REQUIRE(matrix.c2 == 1.0f);
|
||||||
|
REQUIRE(matrix.c3 == 0.0f);
|
||||||
|
REQUIRE(matrix.d0 == 0.0f);
|
||||||
|
REQUIRE(matrix.d1 == 0.0f);
|
||||||
|
REQUIRE(matrix.d2 == 0.0f);
|
||||||
|
REQUIRE(matrix.d3 == 1.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue