Ë
    Ï.fW  ã                   ó(   — d Z ddlmZ  G d„ d«      Zy)zBaccumulator.py: transcription of GeographicLib::Accumulator class.é    )ÚMathc                   ó8   — e Zd ZdZd„ Zd	d„Zd„ Zd	d„Zd„ Zd„ Z	y)
ÚAccumulatorz(Like math.fsum, but allows a running sumc                 óœ   — t        |t        «      r$|j                  |j                  c| _        | _        yt	        |«      dc| _        | _        y)zSet value from argumentç        N)Ú
isinstancer   Ú_sÚ_tÚfloat©ÚselfÚys     úXC:\Users\user\Documents\project_loop\venv\Lib\site-packages\geographiclib/accumulator.pyÚSetzAccumulator.Set   s8   € ä�!”[Ô!ØŸ™˜qŸt™tÐ€d„gˆt�wä˜q› 3Ð€d„gˆt�wó    c                 óB   — dx| _         | _        | j                  |«       y)ÚConstructorr   N)r	   r
   r   r   s     r   Ú__init__zAccumulator.__init__   s   € àÐ€D„GˆdŒgØ‡H�HˆQ…Kr   c                 óü   — t        j                  || j                  «      \  }}t        j                  || j                  «      \  | _        | _        | j                  dk(  r|| _        y| xj                  |z  c_        y)zAdd a valuer   N)r   Úsumr
   r	   )r   r   Úus      r   ÚAddzAccumulator.Add    sZ   € ô �8‰8�A�t—w‘wÓ�D€A€qÜ—x‘x  4§7¡7Ó+Ñ€D„GˆTŒWð: ‡w�w�!‚|Ø€d…gà
‡g‚g��l†gr   c                 ót   — |dk(  r| j                   S t        | «      }|j                  |«       |j                   S )zReturn sum + yr   )r	   r   r   )r   r   Úbs      r   ÚSumzAccumulator.SumG   s0   € àˆC‚xØ�W‰W€nÜ�DÓ€AØ‡E�Eˆ!„HØ�4‰4€Kr   c                 óX   — | xj                   dz  c_         | xj                  dz  c_        y)z
Negate suméÿÿÿÿN)r	   r
   )r   s    r   ÚNegatezAccumulator.NegateO   s   € à‡G‚Gˆr�M…GØ‡G‚Gˆr�M†Gr   c                 óp   — t        j                  | j                  |«      | _        | j                  d«       y)zRemainder on division by yr   N)r   Ú	remainderr	   r   r   s     r   Ú	RemainderzAccumulator.RemainderT   s#   € ä�n‰n˜TŸW™W aÓ(€D„GØ‡H�HˆS…Mr   N)r   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r!   © r   r   r   r      s$   „ Ù0ò'óò
%óNòó
r   r   N)r%   Úgeographiclib.geomathr   r   r&   r   r   ú<module>r(      s   ðÙ Hõ '÷Fò Fr   