Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/p/a/palpy-1.0/test_pal.py   palpy(Download)
    def test_afin(self):
        (d, i) = pal.dafin( "12 34 56.7 |", 1 )
        self.assertEqual( i, 12 )
        self.assertAlmostEqual( d, 0.2196045986911432, 12 )
 
        (d, i) = pal.dafin( "45 00 00.000 ", 1 )
        self.assertEqual( i, 14 )
        self.assertAlmostEqual( d, pal.DPI / 4.0, 12 )
 
        (d, i) = pal.dafin( "30.2 < just decimal degrees", 1 )
        self.assertAlmostEqual( d, 30.2 * pal.DD2R, 12 )
 
        (d, i) = pal.dafin( "  30 23.6 < decimal armin", 1 )
        self.assertEqual( i, 11 )
        self.assertAlmostEqual( d, (30 + 23.6/60)*pal.DD2R, 12 )
 
        (d, i) = pal.dafin( " offset into string: 45.0 <<<", 22 )