public void RotateVectorTest_4() { //Arrange (подготовка) float angle4 = 270F; float distance4 = 20F; float x4 = 0F; float y4 = -20F; //Act (выполнение) Vec2 vector4 = VectorMethod.RotateVector(angle4, distance4); //Assert (проверка) Assert.AreEqual(x4, vector4.X); Assert.AreEqual(y4, vector4.Y); }
public void RotateVectorTest_2() { //Arrange (подготовка) float angle2 = 0F; float distance2 = 20F; float x2 = 20F; float y2 = 0F; //Act (выполнение) Vec2 vector2 = VectorMethod.RotateVector(angle2, distance2); //Assert (проверка) Assert.AreEqual(x2, vector2.X); Assert.AreEqual(y2, vector2.Y); }
public void RotateVectorTest_3() { //Arrange (подготовка) float angle3 = 90F; float distance3 = 20F; float x3 = 0F; float y3 = 20F; //Act (выполнение) Vec2 vector3 = VectorMethod.RotateVector(angle3, distance3); //Assert (проверка) Assert.AreEqual(x3, vector3.X); Assert.AreEqual(y3, vector3.Y); }
public void RotateVectorTest_1() { //Arrange (подготовка) float angle1 = 45F; float distance1 = (float)Math.Sqrt(1 + 1); float x1 = 1F; float y1 = 1F; //Act (выполнение) Vec2 vector1 = VectorMethod.RotateVector(angle1, distance1); //Assert (проверка) Assert.AreEqual(x1, vector1.X); Assert.AreEqual(y1, vector1.Y); }