fix some spline bugs
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f1120a2572
commit
3db1fee4d0
|
@ -8,12 +8,12 @@ namespace MoonTools.Curve
|
|||
/// </summary>
|
||||
public struct SplineCurve3D
|
||||
{
|
||||
public ImmutableArray<ICurve3D> Curves { get; }
|
||||
public ImmutableArray<float> Times { get; }
|
||||
private ICurve3D[] Curves { get; }
|
||||
private float[] Times { get; }
|
||||
public float TotalTime { get; }
|
||||
public bool Loop { get; }
|
||||
|
||||
public SplineCurve3D(ImmutableArray<ICurve3D> curves, ImmutableArray<float> times, bool loop = false)
|
||||
public SplineCurve3D(ICurve3D[] curves, float[] times, bool loop = false)
|
||||
{
|
||||
TotalTime = 0;
|
||||
|
||||
|
@ -51,7 +51,7 @@ namespace MoonTools.Curve
|
|||
}
|
||||
|
||||
index++;
|
||||
startTime = Times[i];
|
||||
startTime = incrementalTime;
|
||||
}
|
||||
|
||||
return Curves[index].Point(t - startTime, 0, Times[index]);
|
||||
|
|
Loading…
Reference in New Issue