Ë
    ˜R1i   ã                   ó>   — d Z ddlmZmZmZmZ ddlmZ ddlm	Z	 d„ Z
y)z)Routines whose currency is Angle objects.é    )Úarctan2ÚsinÚcosÚtan)Útau)ÚAnglec                 óì  — | d   | d   }}|j                   r||}}|d   |d   }}|j                   r||}}|j                  }|j                  dk(  r|j                  n|j                   }|j                  }|j                  dk(  r|j                  n|j                   }t        t	        t        ||z
  «      t        |«      t        |«      z  t        |«      t        ||z
  «      z  z
  «      t        z  ¬«      S )a·  Return the position angle of one position with respect to another.

    Each argument should be a tuple whose first two items are
    :class:`~skyfield.units.Angle` objects, like the tuples returned by
    :meth:`~skyfield.positionlib.ICRF.radec()`,
    :meth:`~skyfield.positionlib.ICRF.frame_latlon()`, and
    :meth:`~skyfield.positionlib.ICRF.altaz()`.

    If one of the two angle items is signed (if its ``.signed``
    attribute is true), then that angle is used as the latitude and the
    other as the longitude; otherwise the first argument is assumed to
    be the latitude.

    If the longitude has a ``.preference`` attribute of ``'hours'``, it
    is assumed to be a right ascension which is positive towards the
    east.  The position angle returned will be 0 degrees if position #2
    is directly north of position #1 on the celestial sphere, 90 degrees
    if east, 180 if south, and 270 if west.

    Otherwise, the longitude is assumed to be azimuth, which measures
    north to east around the horizon.  The position angle returned will
    be 0 degrees if position #2 is directly above position #1 in the
    sky, 90 degrees to its left, 180 if below, and 270 if to the right.

    >>> from skyfield.trigonometry import position_angle_of
    >>> from skyfield.units import Angle
    >>> a = Angle(degrees=0), Angle(degrees=0)
    >>> b = Angle(degrees=1), Angle(degrees=1)
    >>> position_angle_of(a, b)
    <Angle 315deg 00' 15.7">

    r   é   Úhours)Úradians)	Úsignedr   Ú
preferencer   r   r   r   r   r   )Ú
anglepair1Ú
anglepair2Úlat1Úlon1Úlat2Úlon2s         úY/home/cursorai/projects/iching/venv/lib/python3.12/site-packages/skyfield/trigonometry.pyÚposition_angle_ofr      sâ   € ðB ˜A‘ 
¨1¡ˆ$€DØ‡{‚{Ø˜4ˆdˆà˜A‘ 
¨1¡ˆ$€DØ‡{‚{Ø˜4ˆdˆà<‰<€DØŸ?™?¨gÒ5ˆ4<Š<¸D¿L¹L¸=€DØ<‰<€DØŸ?™?¨gÒ5ˆ4<Š<¸D¿L¹L¸=€DäœÜˆD4‰KÓÜˆD‹	”C˜“IÑ¤ D£	¬C°°t±Ó,<Ñ <Ñ<óô 	ñô ð ó    N)Ú__doc__Únumpyr   r   r   r   Úskyfield.constantsr   Úskyfield.unitsr   r   © r   r   Ú<module>r      s   ðÙ /ç (Ó (Ý "Ý  ó1r   