src/resources/track_path.hpp
inline Vector2f path_point_at(const TrackPathNode& a, const TrackPathNode& b, float time_point)
    {
      auto t = time_point, r = 1.0f - t;
      auto tt = t * t, ttt = tt * t;
      auto rr = r * r, rrr = rr * r;

      return rrr * a.position + 3.0f * rr * t * a.second_control +
        3.0f * r * tt * b.first_control + ttt * b.position;
    }
// Interpolate the position on a path between two path nodes
// at a specified time point.
Interpolate the position on a path between two path nodes
at a specified time point.
Interpolate the position on a path between two path nodes at a specified time point .
inline Vector2f path_point_at(const TrackPathNode& a, const TrackPathNode& b, float time_point)
    {
      auto t = time_point, r = 1.0f - t;
      auto tt = t * t, ttt = tt * t;
      auto rr = r * r, rrr = rr * r;
      return rrr * a.position + 3.0f * rr * t * a.second_control +
        3.0f * r * tt * b.first_control + ttt * b.position;
    }
inline Vector2f path_point_at ( const TrackPathNode & a , const TrackPathNode & b , float time_point ) { auto t = time_point , r = 1.0f - t ; auto tt = t * t , ttt = tt * t ; auto rr = r * r , rrr = rr * r ; return rrr * a . position + 3.0f * rr * t * a . second_control + 3.0f * r * tt * b . first_control + ttt * b . position ; }
Interpolate the position on a path between two path nodes
at a specified time point.
Interpolate the position on a path between two path nodes at a specified time point .