public void TestShortestRotationFromZeroSixth() { // Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _clockwiseSixth[0]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _clockwiseSixth[1]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _clockwiseSixth[2]), Clockwise, 0.01f); // Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _clockwiseSixth[3]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _clockwiseSixth[4]), AntiClockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _clockwiseSixth[5]), AntiClockwise, 0.01f); // Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _antiClockwiseSixth[0]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _antiClockwiseSixth[1]), AntiClockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _antiClockwiseSixth[2]), AntiClockwise, 0.01f); // Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _antiClockwiseSixth[3]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _antiClockwiseSixth[4]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(0.0f, _antiClockwiseSixth[5]), Clockwise, 0.01f); }
public void TestShortestRotationFromPiEighth() { // Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[0]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[1]), AntiClockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[2]), AntiClockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[3]), AntiClockwise, 0.01f); // Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[4]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[5]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[6]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _clockwiseEighth[7]), Clockwise, 0.01f); // Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[0]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[1]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[2]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[3]), Clockwise, 0.01f); // Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[4]), Clockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[5]), AntiClockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[6]), AntiClockwise, 0.01f); Assert.AreEqual(TargettingBase.ShortestRotationDirection(Pi, _antiClockwiseEighth[7]), AntiClockwise, 0.01f); }