public void Converter_DeltaAngle_test4() { Polar pol1 = new Polar(2.0, 1.0); Polar pol2 = new Polar(2.0, 2.0707 + Math.PI / 2); double delta = Converter.AngleDelta(pol1.angle - Math.PI, pol2.angle); Assert.AreEqual(delta, 0.5, _Variables.EQUALS_TOLERANCE); }
public void Converter_DeltaAngle_test3() { Polar pol1 = new Polar(2.0, 3.0); Polar pol2 = new Polar(2.0, -3.0); double delta = Converter.AngleDelta(pol1.angle, pol2.angle); Assert.AreEqual(delta, 0.284, _Variables.EQUALS_TOLERANCE); }
public void AngleHandle_delta_test_4() { Vector v1 = new Vector(-1, 1); Vector v2 = new Vector(1, 1); double deltaCW = Converter.AngleDeltaCW(v1, v2); double deltaCCW = Converter.AngleDeltaCCW(v1, v2); double deltaMin = Converter.AngleDelta(v1, v2); Assert.AreEqual(deltaCW, Math.PI / 2, _Variables.EQUALS_TOLERANCE); Assert.AreEqual(deltaCCW, 2 * Math.PI - Math.PI / 2, _Variables.EQUALS_TOLERANCE); Assert.AreEqual(deltaMin, Math.PI / 2, _Variables.EQUALS_TOLERANCE); }
public void AngleHandle_delta_test_2() { double a1 = Math.PI / 2 + Math.PI / 4; double a2 = Math.PI / 4; double deltaCW = Converter.AngleDeltaCW(a1, a2); double deltaCCW = Converter.AngleDeltaCCW(a1, a2); double deltaMin = Converter.AngleDelta(a1, a2); Assert.AreEqual(deltaCW, Math.PI / 2, _Variables.EQUALS_TOLERANCE); Assert.AreEqual(deltaCCW, 2 * Math.PI - Math.PI / 2, _Variables.EQUALS_TOLERANCE); Assert.AreEqual(deltaMin, Math.PI / 2, _Variables.EQUALS_TOLERANCE); }