mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
improved projectile prediction
This commit is contained in:
@@ -4,6 +4,6 @@ project(unit-tests)
|
||||
|
||||
file(GLOB TEST_SRC_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||
include(GoogleTest)
|
||||
add_executable(unit-tests ${TEST_SRC_FILES})
|
||||
target_link_libraries(unit-tests PRIVATE gtest gtest_main uml)
|
||||
gtest_discover_tests(unit-tests)
|
||||
add_executable(unit-tests UnitTestColor.cpp)
|
||||
|
||||
target_link_libraries(unit-tests PRIVATE gtest gtest_main uml)
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <uml/ProjectilePredictor.h>
|
||||
#include <print>
|
||||
|
||||
|
||||
TEST(x,x)
|
||||
{
|
||||
uml::prediction::Target target{.m_origin = {100, 0, 0}, .m_vecVelocity = {0,0, 0}, .m_IsAirborne = false};
|
||||
uml::prediction::Projectile proj = {.m_velocity = 600, .m_gravityMultiplier= 0.1};
|
||||
auto vel = uml::prediction::ProjectilePredictor(400).PredictPointToAim(target, proj);
|
||||
|
||||
std::print("{}", vel.has_value());
|
||||
}
|
||||
Reference in New Issue
Block a user