Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix math point types#2430

Merged
pushfoo merged 7 commits into
pythonarcade:developmentpythonarcade/arcade:developmentfrom
Rapen765:fix-math-point-typesRapen765/arcade:fix-math-point-typesCopy head branch name to clipboard
Jan 1, 2025
Merged

Fix math point types#2430
pushfoo merged 7 commits into
pythonarcade:developmentpythonarcade/arcade:developmentfrom
Rapen765:fix-math-point-typesRapen765/arcade:fix-math-point-typesCopy head branch name to clipboard

Conversation

@Rapen765

Copy link
Copy Markdown
Contributor

Changed functions' return type from tuple[float, float] to Point2.
Fixed documentation of rand_vec_magnitude and rand_on_circle.

@pushfoo pushfoo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TL;DR: I'm undecided on the Point2 change, but I have suggestions on the doc and the doc

@DragonMoffon any thoughts on consistency for Point2 vs the perf dangers of Vec2?

@Rapen765 The CI's linter complaints. Could you please try the following in your local repo clone?

  1. Make sure your venv's activated
  2. ./make.py format && ./make.py ruff
  3. Commit & push

Comment thread arcade/math.py Outdated
Comment thread arcade/math.py Outdated
@DragonMoffon

Copy link
Copy Markdown
Collaborator

I def think Point2 should be used over tuple[float, float] everywhere. The only place it shouldn't be used is anything that returns a tuple[int, int] that should have a different alias (Size2 maybe)

Rapen765 and others added 3 commits October 22, 2024 16:05
Co-authored-by: Paul <36696816+pushfoo@users.noreply.github.com>
Co-authored-by: Paul <36696816+pushfoo@users.noreply.github.com>
@pushfoo pushfoo merged commit c01c2ce into pythonarcade:development Jan 1, 2025
@pushfoo

pushfoo commented Jan 1, 2025

Copy link
Copy Markdown
Member

Ty for the contribution and sorry for the wait!

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.