Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/lvestats/lib/chart/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/lvestats/lib/chart/__pycache__/rdp.cpython-311.pyc

�

)�f����ddlmZdgZd�ZdS)�)�division�ramerdouglasc��t|��dkr|S|d|dkr|d|dfn|d|df\}}|d|dz
}|d|dz
}g}|j}|dd�D]G}|d|dz
}	|d|dz
}
||
|z|	|zz
dz|dz|dzzz���Ht|��}||dzkr||gSt|��dkrt|��dz}n|�|��}t	|d|dz�|��t	||dzd�|��dd�zS)	aDoes Ramer-Douglas-Peucker simplification of a curve with `dist`
    threshold.

    `line` is a list-of-tuples, where each tuple is a 2D coordinate

    Usage is like so:

    >>> myline = [(0.0, 0.0), (1.0, 2.0), (2.0, 1.0)]
    >>> simplified = ramerdouglas(myline, dist = 1.0)
    �r��������i�N)�len�append�max�indexr)
�line�dist�begin�end�begin_end_x�begin_end_y�distSq�dist_append�curr�begin_curr_x�begin_curr_y�maxdist�poss
             ��/builddir/build/BUILDROOT/lve-stats-4.2.8-1.el8.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/lib/chart/rdp.pyrrs����4�y�y�1�}�}���*.�q�'�T�"�X�*=�*=�D��G�T�"�X�&�&�D��G�T�RT�X�CV�L�U�C��a�&�5��8�#�K��a�&�5��8�#�K�
�F��-�K��Q�r�T�
�7�7���A�w��q��)���A�w��q��)����\�K�/�,��2L�L�q�P� �!�^�k�1�n�4�6�	7�	7�	7�	7��&�k�k�G��������s�|��
�6�{�{�S����&�k�k�Q�����l�l�7�#�#����h�s�Q�w�h���.�.���c�A�g�h�h���.�.�q�r�r�2�
3�4�N)�
__future__r�__all__r�rr�<module>r!s:�� �������
��&4�&4�&4�&4�&4r

Hacked By AnonymousFox1.0, Coded By AnonymousFox