Skip to content
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

Handle float pattern-match for normalize function #1051

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

Nico-Sanchez
Copy link
Collaborator

@Nico-Sanchez Nico-Sanchez commented Jan 20, 2025

Motivation

There's an error when the direction is 0 as float.
Closes #1050

Summary of changes

How to test it?

It's hard to trigger, but you can see in the issue how the function was called. If you do Arena.Utils.normalize(%{x: 0.0, y: 0.0}) you get the error.

Checklist

  • Tested the changes locally.
  • Reviewed the changes on GitHub, line by line.
  • This change requires new documentation.
    • Documentation has been added/updated.

@manucamejo manucamejo merged commit 06e19d5 into main Jan 21, 2025
1 check passed
@manucamejo manucamejo deleted the gh-1050-fix-arithmetic-error branch January 21, 2025 18:37
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.

[BUG] ArithmeticError in Arena.Utils module
3 participants