You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renamed GetHorizontalPoints to GetHorizontalDerivativeTValues and renamed and extended GetMaxPoint to GetMinMaxTValues. Aslo added unit tests for both functions.
Assert.AreEqual(4,horizontalDerivatives.Length,"Incorrect number of points with derivative value equal to 0");
220
+
Assert.IsTrue(horizontalDerivatives[0]>=-3&&horizontalDerivatives[0]<=-2,"Spline returns wrong t value: "+horizontalDerivatives[0]+" for first point");
221
+
Assert.IsTrue(horizontalDerivatives[1]>=-1&&horizontalDerivatives[1]<=0,"Spline returns wrong t value: "+horizontalDerivatives[1]+" for second point");
222
+
Assert.IsTrue(horizontalDerivatives[2]>=0&&horizontalDerivatives[2]<=1,"Spline returns wrong t value: "+horizontalDerivatives[2]+" for third point");
223
+
Assert.IsTrue(horizontalDerivatives[3]>=2&&horizontalDerivatives[3]<=3,"Spline returns wrong t value: "+horizontalDerivatives[3]+" for fourth point");
224
+
Console.WriteLine("GetHorizontalDerivativeTValues checked out ok for cubic spline.");
225
+
}
226
+
227
+
/// <summary>
228
+
/// Tests that the min and max values for the natural spline are correct
0 commit comments