pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
941 stars 156 forks source link

add new angle and angle_rad property for vector2 #3221

Closed AntoineMamou closed 1 week ago

AntoineMamou commented 1 week ago

This PR follows this one : https://github.com/pygame-community/pygame-ce/pull/3216 and make the suggested changes.

I added two new properties for Vector2. angle_rad : Returns the vector’s angle in radians relative to the positive x-axis. angle : Returns the angle in degrees, normalized to (180,180].

AntoineMamou commented 1 week ago

something was wrong, sorry