/// <summary>
 /// Returns the instantaneous velocity on the curve given by a normalized time value.
 /// </summary>
 /// <param name="t">A value between startTime and endTime.</param>
 /// <param name="startTime"></param>
 /// <param name="endTime"></param>
 public Vector2 Velocity(float t, float startTime, float endTime) => Velocity(P0, P1, P2, P3, TimeHelper.Normalized(t, startTime, endTime));
 /// <summary>
 /// Returns the curve coordinate given by 4 points and a normalized time value.
 /// </summary>
 /// <param name="p0">The start point.</param>
 /// <param name="p1">The first control point.</param>
 /// <param name="p2">The second control point.</param>
 /// <param name="p3">The end point.</param>
 /// <param name="t">A value between startTime and endTime.</param>
 /// <param name="startTime"></param>
 /// <param name="endTime"></param>
 public static Vector2 Point(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t, float startTime, float endTime)
 {
     return(Point(p0, p1, p2, p3, TimeHelper.Normalized(t, startTime, endTime)));
 }
 /// <summary>
 /// Returns the instantaneous velocity given by 4 points and a normalized time value.
 /// </summary>
 /// <param name="p0">The start point.</param>
 /// <param name="p1">The first control point.</param>
 /// <param name="p2">The second control point.</param>
 /// <param name="p3">The end point.</param>
 /// <param name="t">A value between minT and maxT.</param>
 /// <param name="minT">The starting time value.</param>
 /// <param name="maxT">The ending time value.</param>
 public static Vector2 Velocity(Vector2 p0, Vector2 p1, Vector2 p2, Vector2 p3, float t, float minT, float maxT)
 {
     return(Velocity(p0, p1, p2, p3, TimeHelper.Normalized(t, minT, maxT)));
 }
Beispiel #4
0
 /// <summary>
 /// Returns the instantaneous velocity given by 3 points and a normalized time value.
 /// </summary>
 /// <param name="p0">The start point.</param>
 /// <param name="p1">The control point.</param>
 /// <param name="p2">The end point.</param>
 /// <param name="t">A value between startTime and endTime.</param>
 /// <param name="startTime"></param>
 /// <param name="endTime"></param>
 public static Vector2 Velocity(Vector2 p0, Vector2 p1, Vector2 p2, float t, float startTime, float endTime)
 {
     return(Velocity(p0, p1, p2, TimeHelper.Normalized(t, startTime, endTime)));
 }