mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-12 22:53:27 +00:00
update
This commit is contained in:
@@ -1,13 +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};
|
||||
uml::prediction::Target target{.m_origin = {100, 0, 60}, .m_vecVelocity = {0,0, 0}, .m_IsAirborne = false};
|
||||
uml::prediction::Projectile proj = {.m_origin = {3,2,1}, .m_velocity = 400, .m_gravityMultiplier= 0.4};
|
||||
auto vel = uml::prediction::ProjectilePredictor(400).PredictPointToAim(target, proj);
|
||||
|
||||
std::print("{}", vel.has_value());
|
||||
auto pitch = proj.m_origin.ViewAngleTo(vel.value()).x;
|
||||
|
||||
// printf("pitch: %f", pitch);
|
||||
}
|
||||
Reference in New Issue
Block a user