removed usless code added constexpr

This commit is contained in:
2024-09-03 21:35:48 +03:00
parent cb8c720f03
commit f412d688de
6 changed files with 14 additions and 22 deletions

View File

@@ -3,18 +3,9 @@
//
#include "omath/prediction/Target.h"
#include <cmath>
namespace omath::prediction
{
Vector3 Target::PredictPosition(const float time, const float gravity) const
{
auto predicted = m_origin + m_velocity * time;
if (m_isAirborne)
predicted.z -= gravity * std::pow(time, 2.f) * 0.5f;
return predicted;
}
}