This is my Point.cs file that is failing.
// Rotates the point counter-clockwise by deg degrees. For example, applying
// a 90 degree rotation to (1, 0) should give (0, 1).
public void rotate(double deg)
{
double rotCos = Math.Cos(deg * Math.PI / 180);
double rotSin = Math.Sin(deg * Math.PI / 180);
double oldX = x;
double oldY = y;
x = oldX * rotCos - oldY * rotSin;
y = oldX * rotSin + oldY * rotCos;
Point point = new Point(x, y);
}
I run this test and get the result:
"Message: Assert.AreEqual failed. Expected:<2>. Actual:<2>."
[TestMethod]
public void Rotate_Test()
{
double rotate = -90;
double i = 4;
double o = 2;
Point point = new Point(i, o);
double expectedX = 2;
double expectedY = 4;
point.rotate(rotate);
Assert.AreEqual(expectedX, point.getX());
Assert.AreEqual(expectedY, point.getY());
}