added unit test

This commit is contained in:
2024-08-27 10:56:56 +03:00
parent db57dfd5f9
commit 13188615ed
5 changed files with 39 additions and 11 deletions

View File

@@ -0,0 +1,15 @@
//
// Created by Vlad on 27.08.2024.
//
#include <gtest/gtest.h>
#include <omath/matrix.h>
#include <print>
#include <omath/projection/Camera.h>
TEST(UnitTestProjection, IsPointOnScreen)
{
const omath::projection::Camera camera({}, {90, 0.f, 0.f} , {1920.f, 1080.f, 0.f}, 120, 10, 100);
const auto proj = camera.WorldToScreen({0,0,15});
EXPECT_TRUE(proj.has_value());
}