[FEAT] Use CPM and catch2 has library

This commit is contained in:
NADAL Jean-Baptiste
2024-03-18 12:44:42 +01:00
parent 544200ae14
commit b2ba503d24
22 changed files with 113 additions and 18000 deletions

View File

@@ -25,7 +25,9 @@
/*---------------------------------------------------------------------------*/
#include <external/catch.hpp>
#include <cmath>
#include <catch2/catch_test_macros.hpp>
#include "raytracing.h"
@@ -180,7 +182,7 @@ SCENARIO("Rotating a point around the x axis", "[features/transformations.featur
Matrix full_quarter = Matrix::rotation_x(std::numbers::pi / 2);
THEN("half_quarter * p = point(0, sqrt(2) / 2, sqrt(2) / 2)")
{
REQUIRE(half_quarter * p == Tuple::Point(0, sqrt(2) / 2, sqrt(2) / 2));
REQUIRE(half_quarter * p == Tuple::Point(0, std::sqrt(2) / 2, std::sqrt(2) / 2));
}
AND_THEN("full_quarter * p == point(0, 0, 1)")
{