
    \i9                     *    S SK r S SKJr  S rS rS rg)    N)Affinec                     [         R                  " S5      S-  u  p[        U S5      [        [        R                  " S5      S-  S5      :X  d   e[        US5      [        [        R                  " S5      S-  S5      :X  d   eg)zA positive angle rotates a vector counter clockwise

(1.0, 0.0):

    |
    |
    |
    |
    0---------*

Affine.rotation(45.0) * (1.0, 0.0) == (0.707..., 0.707...)

    |
    |      *
    |
    |
    0----------
g     F@)      ?                  @N)r   rotationroundmathsqrt)xys     ]/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/affine/tests/test_rotation.pytest_rotation_angler      si    & ??4 :-DAB<53#!5r::::B<53#!5r::::    c                     [         R                  " S5      n [        U R                  S5      [        [        R
                  " [        R                  S-  5      S5      :X  d   e[        U R                  S5      [        [        R                  " [        R                  S-  5      * S5      :X  d   eU R                  S:X  d   e[        U R                  S5      [        [        R                  " [        R                  S-  5      S5      :X  d   e[        U R                  S5      [        [        R
                  " [        R                  S-  5      S5      :X  d   eU R                  S:X  d   eg)zPA rotation matrix has expected elements

| cos(a) -sin(a) |
| sin(a)  cos(a) |

     V@   r   r   N)r   r	   r
   ar   cospibsincdef)rots    r   test_rotation_matrixr      s     //$
CuTXXdggm%<bAAAAudhhtww}&=%=rBBBB55C<<uTXXdggm%<bAAAAuTXXdggm%<bAAAA55C<<r   c                     [         R                  " SSS9n [         R                  " SS5      [         R                  " S5      -  [         R                  " SS5      -  n[        X5       H!  u  p#[	        US5      [	        US5      :X  a  M!   e   g)z2A rotation matrix with pivot has expected elementsr   )r   r   )pivotr   g      r   N)r   r	   translationzipr
   )r   exprr   s       r   test_rotation_matrix_pivotr&   .   sy    
//$j
1C3$
//$
	 


T4
(	) 
 CQ|uQ|+++ r   )r   affiner   r   r   r&    r   r   <module>r)      s     ;0 	,r   