public void TestLinear3dInterpolationExceptionWrongNumberOfArguments() { // arrange var interpolator = new LinearInterpolator(); var xVals = new List <double> { 1, 3.5, 1, 3.5, 10 }; var yVals = new List <double> { -0.8, -0.8, 1.2, 1.2 }; var zVals = new List <double> { 1.2, 2.2, -3.4 }; var interpolate = new List <double> { 2.1, 0.1 }; // act/assert var result = interpolator.Interpolate3D(xVals, yVals, zVals, interpolate); }
public void TestLinear3dInterpolation() { // arrange var interpolator = new LinearInterpolator(); var xVals = new List <double> { 1, 3.5, 1, 3.5 }; var yVals = new List <double> { -0.8, -0.8, 1.2, 1.2 }; var zVals = new List <double> { 1.2, 2.2, -3.4, 5 }; var interpolate = new List <double> { 2.1, 0.1 }; // act var result = interpolator.Interpolate3D(xVals, yVals, zVals, interpolate); // assert Assert.AreEqual(1.0352, result, 1e-6); }