changed source files naming

This commit is contained in:
2025-03-21 04:30:17 +03:00
parent 2688d977a9
commit c7dda0ff10
40 changed files with 25 additions and 25 deletions

View File

@@ -0,0 +1,21 @@
//
// Created by Vlad on 6/9/2024.
//
#include "omath/projectile_prediction/Projectile.hpp"
#include <omath/engines/source_engine/Formulas.hpp>
namespace omath::projectile_prediction
{
Vector3<float> Projectile::PredictPosition(const float pitch, const float yaw, const float time, const float gravity) const
{
auto currentPos = m_origin + source_engine::ForwardVector({source_engine::PitchAngle::FromDegrees(-pitch),
source_engine::YawAngle::FromDegrees(yaw),
source_engine::RollAngle::FromDegrees(0)}) *
m_launchSpeed * time;
currentPos.z -= (gravity * m_gravityScale) * (time * time) * 0.5f;
return currentPos;
}
} // namespace omath::prediction