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

      auto d = 3.0f * rr * (a.second_control - a.position) + 6.0f * r * t * (b.first_control - a.second_control)
        + 3.0f * tt * (b.position - b.first_control);

      return normalize(d);
    }
// Compute the normal of a path segment at the specified time point.
Compute the normal of a path segment at the specified time point.
Compute the normal of a path segment at the specified time point .
inline Vector2f path_direction_at(const TrackPathNode& a, const TrackPathNode& b, float time_point)
    {
      auto t = time_point, r = 1.0f - time_point;
      auto tt = t * t, rr = r * r;
      auto d = 3.0f * rr * (a.second_control - a.position) + 6.0f * r * t * (b.first_control - a.second_control)
        + 3.0f * tt * (b.position - b.first_control);
      return normalize(d);
    }
inline Vector2f path_direction_at ( const TrackPathNode & a , const TrackPathNode & b , float time_point ) { auto t = time_point , r = 1.0f - time_point ; auto tt = t * t , rr = r * r ; auto d = 3.0f * rr * ( a . second_control - a . position ) + 6.0f * r * t * ( b . first_control - a . second_control ) + 3.0f * tt * ( b . position - b . first_control ) ; return normalize ( d ) ; }
Compute the normal of a path segment at the specified time point.
Compute the normal of a path segment at the specified time point .