Skip to content

Fix angle and rotation bugs in math utils #2755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Raahi-18
Copy link

Fixed three bugs in math.py:

  1. Fixed rand_vec_spread_deg to convert degrees to radians before passing to Vec2.from_polar. Bug: rand_vec_spread_deg incorrectly passes degrees to Vec2.from_polar which requires radians #2648
  2. Fixed rotate_around_point to properly rotate around the source point instead of the target. Bug: rotate_around_point function in math.py returns incorrect results due to wrong translation #2753
  3. Corrected argument order in math.atan2 in get_angle_radians function, which previously caused incorrect angle calculations. Bug: get_angle_radians function in math.py returns incorrect angle due to swapped atan2 parameters #2754

…s argument order, fixed rotate_around_point offset, converted degrees to radians in rand_vec_spread_deg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant