refactored tests

This commit is contained in:
2024-11-27 19:36:28 +03:00
parent 480d11dbc0
commit 6a9a51b39c
19 changed files with 55 additions and 26 deletions

View File

@@ -0,0 +1,19 @@
//
// Created by Vlad on 27.08.2024.
//
#include <complex>
#include <gtest/gtest.h>
#include <omath/Matrix.hpp>
#include <print>
#include <omath/projection/Camera.hpp>
TEST(UnitTestProjection, Projection)
{
const omath::projection::Camera camera({0.f, 0.f, 0.f}, {0, 0.f, 0.f} , {1920.f, 1080.f}, 110.f, 0.375f, 5000.f, 1.335f);
const auto projected = camera.WorldToScreen({5000, 0, 0});
EXPECT_TRUE(projected.has_value());
EXPECT_EQ(projected->z, 1.f);
}