ó
å™xTc           @   sc   d  d l  m Z d  d l m Z m Z m Z m Z d „  Z e d „ Z	 e d „ Z
 e d „ Z d S(   iÿÿÿÿ(   t   division(   t   pit   atan2t   cost   sinc         C   s   |  j  d |  j d S(   Ni   (   t   realt   imag(   t   c(    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/complex_math.pyt   norm   s    c         C   sR   t  |  ƒ } | d k r d St |  j |  j ƒ } | rH | d t 9} n  | | f S(   sG   conversion of complex number: real, imag -> absolute value, polar anglei    i´   (   i    i    (   t   absR   R   R   R   (   R   t   degt   at   t(    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/complex_math.pyt   abs_arg   s      c         C   s   t  |  | ƒ d S(   s7   conversion of complex number: real, imag -> polar anglei   (   R   (   R   R
   (    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/complex_math.pyt   arg   s    c         C   sD   |  \ } } | r# | t  d 9} n  t | t | ƒ | t | ƒ ƒ S(   s@   conversion of complex number: polar representation -> real, imagi´   (   R   t   complexR   R   (   t   a_tR
   R   R   (    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/complex_math.pyt   polar   s     N(   t
   __future__R    t   mathR   R   R   R   R   t   FalseR   R   R   (    (    (    sA   /public2/ftp/pub/ccp4/6.5/ccp4-6.5/lib/py2/libtbx/complex_math.pyt   <module>   s
   "	