예제 #1
0
 public void Atan()
 {
     Assert.AreEqual(0, DoubleAngle.Atan(new DoublePoint(5, 0)), 0.001);
     Assert.AreEqual(0.25 * Math.PI, DoubleAngle.Atan(new DoublePoint(1, 1)), 0.001);
     Assert.AreEqual(0.5 * Math.PI, DoubleAngle.Atan(new DoublePoint(0, 3)), 0.001);
     Assert.AreEqual(Math.PI, DoubleAngle.Atan(new DoublePoint(-0.3, 0)), 0.001);
     Assert.AreEqual(1.5 * Math.PI, DoubleAngle.Atan(new DoublePoint(0, -1)), 0.001);
     Assert.AreEqual(1.75 * Math.PI, DoubleAngle.Atan(new DoublePoint(1, -1)), 0.001);
 }
예제 #2
0
 public void AtanCenter()
 {
     Assert.AreEqual(0.25 * Math.PI, DoubleAngle.Atan(new IntPoint(2, 3), new IntPoint(4, 5)), 0.001);
 }
예제 #3
0
 public void AtanPoint()
 {
     Assert.AreEqual(0.5 * Math.PI, DoubleAngle.Atan(new IntPoint(0, 2)), 0.001);
 }