Exemple #1
0
 def test_pi_on_six(self):
     self.assertAlmostEqual(dc.phase(math.sqrt(3) / 2.0, 1.0 / 2.0),
                            math.pi / 6.0)
Exemple #2
0
 def test_zero_one(self):
     self.assertEqual(dc.phase(0.0, 1.0), math.pi / 2.0)
Exemple #3
0
 def test_pi_on_four(self):
     self.assertEqual(dc.phase(math.sqrt(2) / 2.0,
                               math.sqrt(2) / 2.0), math.pi / 4.0)
Exemple #4
0
 def test_zero_zero(self):
     self.assertEqual(dc.phase(0.0, 0.0), 0.0)
Exemple #5
0
 def test_one_zero(self):
     self.assertEqual(dc.phase(1.0, 0.0), 0.0)
Exemple #6
0
 def test_pi_on_six(self):
     self.assertAlmostEqual(dc.phase(math.sqrt(3) / 2.0, 1.0 / 2.0), math.pi / 6.0)
Exemple #7
0
 def test_pi_on_four(self):
     self.assertEqual(dc.phase(math.sqrt(2) / 2.0, math.sqrt(2) / 2.0), math.pi / 4.0)
Exemple #8
0
 def test_zero_one(self):
     self.assertEqual(dc.phase(0.0, 1.0), math.pi / 2.0)
Exemple #9
0
 def test_one_zero(self):
     self.assertEqual(dc.phase(1.0, 0.0), 0.0)
Exemple #10
0
 def test_zero_zero(self):
     self.assertEqual(dc.phase(0.0, 0.0), 0.0)