Пример #1
0
 def distance(self, p1, p2):
     '''Return the L{flatPolar_} distance in C{radians}.
     '''
     r, _ = unrollPI(p1.lam, p2.lam, wrap=self._wrap)
     return flatPolar_(p2.phi, p1.phi, r)
Пример #2
0
 def _distances(self, x, y):  # (x, y) radians
     for xk, yk in zip(self._xs, self._ys):
         d, _ = unrollPI(xk, x, wrap=self._wrap)
         yield flatPolar_(yk, y, d)  # radians