public void Rotate_Screen_360Degrees() { //assign Geometry.MarginOfError = 0.001; Geometry.CoordinatePlane = Geometry.CoordinatePlanes.Screen; WPoint start = new WPoint(2, 0); WPoint reference = new WPoint(1, 1); double degrees = 360; //act WPoint result = start.Rotate(reference, degrees); //assert Assert.AreEqual(start, result); }
public void Rotate_Paper_315Degrees() { //assign Geometry.MarginOfError = 0.001; Geometry.CoordinatePlane = Geometry.CoordinatePlanes.Paper; WPoint start = new WPoint(2, 0); WPoint reference = new WPoint(1, 1); double degrees = 315; //act WPoint result = start.Rotate(reference, degrees); //assert Assert.AreEqual(new WPoint(1, -0.414), result); }