
    	e                         d dl mZ d dlZ	 d dlmZmZmZ n# e$ r Y nw xY wdZd Z	d Z
d Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"d Z#d  Z$d! Z%dQd#Z&dQd$Z'dQd%Z(dQd&Z)dQd'Z*dQd(Z+d) Z,d* Z-d+ Z.d, Z/d- Z0d. Z1d/ Z2d0 Z3d1 Z4d2 Z5d3 Z6d4 Z7d5 Z8d6 Z9d7 Z:d8 Z;d9 Z<d: Z=	 dRd=Z>dRd>Z?	 dRd?Z@dRd@ZA	 dSdBZBdSdCZCdTdEZDdTdFZEdTdGZFdTdHZGdTdIZHdTdJZIdK ZJdL ZKdM ZLdN ZMdO ZNdP ZOdS )U    )divisionN)ListTupleUnionz1.2.0c                 `   t          |           t          |          t          |          t          |          f\  } }}}g }t          ||z
            t          || z
            k    }|r|| }} ||}}d}| |k    r
|| }} ||}}d}|| z
  }t          ||z
            }t          |dz            }	|}
d}||k     rd}nd}t          | |dz             D ]H}|r|                    |
|f           n|                    ||
f           |	|z  }	|	dk     r
|
|z  }
|	|z  }	I|r|                                 |S )a0  Returns a list of (x, y) tuples of every point on a line between
    (x1, y1) and (x2, y2). The x and y values inside the tuple are integers.

    Line generated with the Bresenham algorithm.

    Args:
      x1 (int, float): The x coordinate of the line's start point.
      y1 (int, float): The y coordinate of the line's start point.
      x2 (int, float): The x coordinate of the line's end point.
      y2 (int, float): The y coordiante of the line's end point.

    Returns:
      [(x1, y1), (x2, y2), (x3, y3), ...]

    Example:
    >>> getLine(0, 0, 6, 6)
    [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]
    >>> getLine(0, 0, 3, 6)
    [(0, 0), (0, 1), (1, 2), (1, 3), (2, 4), (2, 5), (3, 6)]
    >>> getLine(3, 3, -3, -3)
    [(3, 3), (2, 2), (1, 1), (0, 0), (-1, -1), (-2, -2), (-3, -3)]
    FT   N   r   )intabsrangeappendreverse)x1y1x2y2pointsissteeprevdeltaxdeltayerroryystepxs                V/var/www/api.educacionweb.es/myenv/lib/python3.11/site-packages/pytweening/__init__.pygetLiner      sp   . WWc"ggs2wwB7NBBF"r'llSb\\)G RBRB
C	BwwRBRB"WFb\\F
OOE
AE	Bww2rAv   	"MM1a&!!!!MM1a&!!!199JAVOE
 M    c                 .    || z
  |z  | z   ||z
  |z  |z   fS )a#  Returns the (x, y) tuple of the point that has progressed a proportion
    n along the line defined by the two x, y coordinates.

    Args:
      startX (int, float): The x coordinate of the line's start point.
      startY (int, float): The y coordinate of the line's start point.
      endX (int, float): The x coordinate of the line's end point.
      endY (int, float): The y coordinate of the line's end point.
      n (int, float): Progress along the line. 0.0 is the start point, 1.0 is the end point. 0.5 is the midpoint. This value can be less than 0.0 or greater than 1.0.

    Returns:
      Tuple of floats for the x, y coordinate of the point.

    Example:
    >>> getPointOnLine(0, 0, 6, 6, 0)
    (0, 0)
    >>> getPointOnLine(0, 0, 6, 6, 1)
    (6, 6)
    >>> getPointOnLine(0, 0, 6, 6, 0.5)
    (3.0, 3.0)
    >>> getPointOnLine(0, 0, 6, 6, 0.75)
    (4.5, 4.5)
    >>> getPointOnLine(3, 3, -3, -3, 0.5)
    (0.0, 0.0)
    >>> getPointOnLine(3, 3, -3, -3, 0.25)
    (1.5, 1.5)
    >>> getPointOnLine(3, 3, -3, -3, 0.75)
    (-1.5, -1.5)
     )startXstartYendXendYns        r   getPointOnLiner'   H   s,    @ Vmq F*dVmq-@F,JKKr   c              '     K    |dg|R  }|| z
  |z  | z   ||z
  |z  |z   fV  |}|dz   dk     r/ ||g|R  }|| z
  |z  | z   ||z
  |z  |z   fV  ||z  }|dz   dk     / |dg|R  }|| z
  |z  | z   ||z
  |z  |z   fV  d S )Ng        g      <g      ?r!   )	r"   r#   r$   r%   intervalSizetweeningFuncargstir&   s	            r   
_iterTweenr-   k   s     	c	!D	!	!	!BF]b F*dVmr-AV,K
LLLLA $
$s
*
*\!#d###"$.$-21E0OPPPP	\ $
$s
*
*
 
c	!D	!	!	!BF]b F*dVmr-AV,K
LLLLLLr   c                     | S )zConstant speed tween function.

    Example:
    >>> linear(0.0)
    0.0
    >>> linear(0.2)
    0.2
    >>> linear(0.4)
    0.4
    >>> linear(0.6)
    0.6
    >>> linear(0.8)
    0.8
    >>> linear(1.0)
    1.0
    r!   r&   s    r   linearr0   {   s	    " Hr   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a linear tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)iterr-   r0   r"   r#   r$   r%   r)   s        r   
iterLinearr4      s$     
664|VLLMMMr   c                     | dz  S )a  Start slow and accelerate (Quadratic function).

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r!   r/   s    r   
easeInQuadr6           a4Kr   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInQuad tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r6   r3   s        r   iterEaseInQuadr9      $     
664|ZPPQQQr   c                     |  | dz
  z  S )a  Starts fast and decelerates to stop. (Quadratic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r!   r/   s    r   easeOutQuadr<      s     2Q<r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutQuad tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r<   r3   s        r   iterEaseOutQuadr>      $     
664|[QQRRRr   c                 J    | dk     rd| dz  z  S | dz  dz
  } d| | dz
  z  dz
  z  S )a&  Accelerates, reaches the midpoint, and then decelerates. (Quadratic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
          ?r   r	         r!   r/   s    r   easeInOutQuadrC      s>     	3ww1a4xEAIqAE{Q''r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutQuad tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rC   r3   s        r   iterEaseInOutQuadrE      $     
664|]SSTTTr   c                     | dz  S )a  Starts fast and decelerates. (Cubic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
       r!   r/   s    r   easeInCubicrI      r7   r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInCubic tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rI   r3   s        r   iterEaseInCubicrK      r?   r   c                     | dz  } | dz  dz   S )a  Starts fast and decelerates to stop. (Cubic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   rH   r!   r/   s    r   easeOutCubicrM           FAa4!8Or   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutCubic tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rM   r3   s        r   iterEaseOutCubicrP      $     
664|\RRSSSr   c                 H    | dz  } | dk     rd| dz  z  S | dz  } d| dz  dz   z  S )a"  Accelerates, reaches the midpoint, and then decelerates. (Cubic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   rA   rH   r!   r/   s    r   easeInOutCubicrS      @     FA1uuQTz	QadQhr   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutCubic tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rS   r3   s        r   iterEaseInOutCubicrV     $     
664|^TTUUUr   c                     | dz  S )a  Starts fast and decelerates. (Quartic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
       r!   r/   s    r   easeInQuartrZ     r7   r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInQuart tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rZ   r3   s        r   iterEaseInQuartr\     r?   r   c                     | dz  } | dz  dz
   S )a  Starts fast and decelerates to stop. (Quartic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   rY   r!   r/   s    r   easeOutQuartr^   %  s     FATAX;r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutQuart tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r^   r3   s        r   iterEaseOutQuartr`   2  rQ   r   c                 H    | dz  } | dk     rd| dz  z  S | dz  } d| dz  dz
  z  S )a$  Accelerates, reaches the midpoint, and then decelerates. (Quartic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   rA   rY   rB   r!   r/   s    r   easeInOutQuartrb   9  s@     FA1uuQTz	Qq!tax  r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutQuart tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rb   r3   s        r   iterEaseInOutQuartrd   J  rW   r   c                     | dz  S )a  Starts fast and decelerates. (Quintic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
       r!   r/   s    r   easeInQuintrg   Q  r7   r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInQuint tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rg   r3   s        r   iterEaseInQuintri   ]  r?   r   c                     | dz  } | dz  dz   S )a  Starts fast and decelerates to stop. (Quintic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   rf   r!   r/   s    r   easeOutQuintrk   d  rN   r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutQuint tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   rk   r3   s        r   iterEaseOutQuintrm   q  rQ   r   c                 H    | dz  } | dk     rd| dz  z  S | dz  } d| dz  dz   z  S )a$  Accelerates, reaches the midpoint, and then decelerates. (Quintic function.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   rA   rf   r!   r/   s    r   easeInOutQuintro   x  rT   r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutQuint tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   ro   r3   s        r   iterEaseInOutQuintrq     rW   r   r   c                 n    t          |t          t          f          r|dk     rt          d          | |z  S )a`  Starts fast and decelerates. (Polynomial function with custom degree.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.
      degree (int, float): The degree of the polynomial function.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   *degree argument must be a positive number.)
isinstancer   float
ValueErrorr&   degrees     r   
easeInPolyry     s<     fsEl++ GvzzEFFFf9r   c                 P    t          t          | ||||t          |                    S )zReturns an iterator of a easeInPoly tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   ry   r"   r#   r$   r%   r)   rx   s         r   iterEaseInPolyr|     s'     
664|ZQWXXYYYr   c                     t          |t          t          f          r|dk     rt          d          dt	          | dz
  |z            z
  S )h  Starts fast and decelerates to stop. (Polynomial function with custom degree.)

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.
      degree (int, float): The degree of the polynomial function.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   rs   r	   rt   r   ru   rv   r   rw   s     r   easeOutPolyr     sN     fsEl++ GvzzEFFFsAEf$%%%%r   c                 P    t          t          | ||||t          |                    S )zReturns an iterator of a easeOutPoly tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r{   s         r   iterEaseOutPolyr     s'     
664|[RXYYZZZr   c                     t          |t          t          f          r|dk     rt          d          | dz  } | dk     rd| |z  z  S | dz  } ddt	          | |z            z  z
  S )r~   r   rs   r   r	   rA   r   rw   s     r   easeInOutPolyr     su     fsEl++ GvzzEFFFFA1uuQY	Q3QY'''r   c                 P    t          t          | ||||t          |                    S )zReturns an iterator of a easeInOutPoly tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r{   s         r   iterEaseInOutPolyr     s'     
664|]TZ[[\\\r   c                 V    dt          j        | t           j        z  dz            z  dz   S )a  A sinusoidal tween function that begins slow and then accelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r
   r   r	   mathcospir/   s    r   
easeInSiner     s(     TWq)))A--r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInSine tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInSiner     r:   r   c                 J    t          j        | t           j        z  dz            S )a  A sinusoidal tween function that begins fast and then decelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   )r   sinr   r/   s    r   easeOutSiner     s     8AK!O$$$r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutSine tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseOutSiner     r?   r   c                 P    dt          j        t           j        | z            dz
  z  S )a1  A sinusoidal tween function that accelerates, reaches the midpoint, and then decelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    rB   r	   r   r/   s    r   easeInOutSiner     s$     48DGaK((1,--r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutSine tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInOutSiner   
  rF   r   c                 (    | dk    rdS dd| dz
  z  z  S )a  An exponential tween function that begins slow and then accelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r   
   r	   r!   r/   s    r   
easeInExpor     s%     	AvvqR1q5\""r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInExpo tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInExpor      r:   r   c                 *    | dk    rdS dd| z  z   dz   S )a  An exponential tween function that begins fast and then decelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   r   r!   r/   s    r   easeOutExpor   '  s(     	AvvqsQw 1$$r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutExpo tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseOutExpor   6  r?   r   c                     | dk    rdS | dk    rdS | dz  } | dk     rddd| dz
  z  z  z  S | dz  } dddd| z  z  z  dz   z  S )a3  An exponential tween function that accelerates, reaches the midpoint, and then decelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   r   rA   r   r
   r   r!   r/   s    r   easeInOutExpor   =  sp     	Avvq	
aq	Qq55rQU|,,,FA"cAg/!344r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutExpo tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInOutExpor   T  rF   r   c                 B    dt          j        d| | z  z
            dz
  z  S )a  A circular tween function that begins slow and then accelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r
   r	   r   sqrtr/   s    r   
easeInCircr   [  s&     1q1u9%%)**r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInCirc tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInCircr   g  r:   r   c                 @    | dz  } t          j        d| | z  z
            S )a  A circular tween function that begins fast and then decelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   r   r/   s    r   easeOutCircr   n  s%     FA9Q!a%[!!!r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutCirc tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseOutCircr   {  r?   r   c                     | dz  } | dk     r dt          j        d| dz  z
            dz
  z  S | dz  } dt          j        d| dz  z
            dz   z  S )a/  A circular tween function that accelerates, reaches the midpoint, and then decelerates.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   rB   rA   r   r/   s    r   easeInOutCircr     sc     FA1uutyQT**Q.//	QdiAqD))A-..r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutCirc tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInOutCircr     rF   r   r	   333333?c                 2    dt          d| z
  ||          z
  S )a<  An elastic tween function that begins with an increasing wobble and then snaps into the destination.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   	amplitudeperiod)easeOutElasticr&   r   r   s      r   easeInElasticr     s"     ~a!eyHHHHHr   c                 R    t          t          | ||||t          ||                    S )zReturns an iterator of a easeInElastic tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r"   r#   r$   r%   r)   r   r   s          r   iterEaseInElasticr     s*     
664|]T]_effgggr   c                     |dk     rd}|dz  }n*|dt           j        z  z  t          j        d|z            z  }|dd| z  z  z  t          j        | |z
  dt           j        z  |z  z            z  dz   S )a?  An elastic tween function that overshoots the destination and then "rubber bands" into the destination.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   rY   r   r   )r   r   asinr   )r&   r   r   ss       r   r   r     s|     1}}	QJa$'k"TYq9}%=%==qS1W~%!a%AK&<P1Q(R(RRUVVVr   c                 R    t          t          | ||||t          ||                    S )zReturns an iterator of a easeOutElastic tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r   s          r   iterEaseOutElasticr     s*     
664|^U^`fgghhhr   rA   c                 x    | dz  } | dk     rt          | ||          dz  S t          | dz
  ||          dz  dz   S )a  An elastic tween function wobbles towards the midpoint.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   r   rA   )r   r   r   s      r   easeInOutElasticr     sS     FA1uuQ)FCCCaGGa!eyHHH1LsRRr   c                 R    t          t          | ||||t          ||                    S )zReturns an iterator of a easeInOutElastic tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r   s          r   iterEaseInOutElasticr     s+     
664|EUW`bhiijjjr   aq89?c                 $    | | z  |dz   | z  |z
  z  S )a+  A tween function that backs up first at the start and then goes to the destination.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   r!   r&   r   s     r   
easeInBackr     s     q5QUaK!O$$r   c                 P    t          t          | ||||t          |                    S )zReturns an iterator of a easeInBack tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r"   r#   r$   r%   r)   r   s         r   iterEaseInBackr     s'     
664|ZQRSSTTTr   c                 4    | dz  } | | z  |dz   | z  |z   z  dz   S )a6  A tween function that overshoots the destination a little and then backs into the destination.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   r!   r   s     r   easeOutBackr     s-     FAq5QUaK!O$q((r   c                 P    t          t          | ||||t          |                    S )zReturns an iterator of a easeOutBack tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r   s         r   iterEaseOutBackr     s'     
664|[RSTTUUUr   c                     | dz  } | dk     r|dz  }d| | z  |dz   | z  |z
  z  z  S | dz  } |dz  }d| | z  |dz   | z  |z   z  dz   z  S )a"  A "back-in" tween function that overshoots both the start and destination.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r   r	   gffffff?rA   r!   r   s     r   easeInOutBackr     sv     FA1uu	U
a!eA{Q/00	Q	U
a!eA{Q/!344r   c                 P    t          t          | ||||t          |                    S )zReturns an iterator of a easeInOutBack tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r   s         r   iterEaseInOutBackr     s'     
664|]TUVVWWWr   c                 ,    dt          d| z
            z
  S )a)  A bouncing tween function that begins bouncing and then jumps to the destination.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    r	   )easeOutBouncer/   s    r   easeInBouncer   %  s     }QU####r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInBounce tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInBouncer   1  rQ   r   c                     | dk     rd| z  | z  S | dk     r| dz  } d| z  | z  dz   S | dk     r| dz  } d| z  | z  dz   S | d	z  } d| z  | z  d
z   S )a%  A bouncing tween function that hits the destination and then bounces to rest.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    gF]tE?g     @@gF]tE?gtE]t?g      ?g]tE?g/袋.?g      ?g־a?g     ?r!   r/   s    r   r   r   8  s     	H~~zA~	
h	ZzA~$$	
j			[zA~&&	[zA~((r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeOutBounce tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseOutBouncer   N  rF   r   c                 n    | dk     rt          | dz            dz  S t          | dz  dz
            dz  dz   S )a  A bouncing tween function that bounces at the start and end.

    Args:
      n (int, float): The time progress, starting at 0.0 and ending at 1.0.

    Returns:
      (float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().
    rA   r   r	   )r   r   r/   s    r   easeInOutBouncer   U  sD     	3wwAE""S((QUQY''#-33r   c           
      N    t          t          | ||||t                              S )zReturns an iterator of a easeInOutBounce tween between the start and end points, incrementing the
    interpolation factor by intervalSize each time. Guaranteed to return the point for 0.0 first
    and 1.0 last no matter the intervalSize.)r2   r-   r   r3   s        r   iterEaseInOutBouncer   d  s$     
664|_UUVVVr   )r   )r	   r   )r	   rA   )r   )P
__future__r   r   typingr   r   r   ImportError__version__r   r'   r-   r0   r4   r6   r9   r<   r>   rC   rE   rI   rK   rM   rP   rS   rV   rZ   r\   r^   r`   rb   rd   rg   ri   rk   rm   ro   rq   ry   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r!   r   r   <module>r      s         	))))))))))) 	 	 	D	 7 7 7t L  L  LFM M M   (N N N	 	 	R R R	 	 	S S S( ( ( U U U	 	 	S S S
 
 
T T T     "V V V	 	 	S S S
 
 
T T T! ! !"V V V	 	 	S S S
 
 
T T T     "V V V   Z Z Z Z& & & &[ [ [ [( ( ( (*] ] ] ]	. 	. 	.R R R	% 	% 	%S S S	. 	. 	.U U U# # #R R R% % %S S S5 5 5.U U U	+ 	+ 	+R R R
" 
" 
"S S S/ / /"U U U I I I Ih h h h W W W W*i i i i S S S S$k k k k	% 	% 	% 	%U U U U
) 
) 
) 
)V V V V5 5 5 5&X X X X	$ 	$ 	$T T T) ) ),U U U4 4 4W W W W Ws   
 