public static void YatX(double xCoord, double x, double y, double rotation, double yCoordExpected) { CartesianCoordinate center = new CartesianCoordinate(x, y); EllipticalCurve curve = new EllipticalCurve(a, b, center, rotation, Tolerance); double yCoord = curve.YatX(xCoord); Assert.AreEqual(yCoordExpected, yCoord, Tolerance); }
public static void YatX_Out_of_Range_Return_Infinity(double xCoord, double x, double y, double rotation) { CartesianCoordinate center = new CartesianCoordinate(x, y); EllipticalCurve curve = new EllipticalCurve(a, b, center, rotation, Tolerance); double yCoord = curve.YatX(xCoord); Assert.AreEqual(double.PositiveInfinity, yCoord); }