mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 07:03:25 +00:00
removed usless code added constexpr
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user