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

Add and expose Basis/Transform2D/3D division by float operator #86364

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

aaronfranke
Copy link
Member

I ran into a situation where I needed to use basis * (1.0 / number) to inversely scale a basis uniformly, but it would've been nicer to have a division operator. This PR adds that operator. The code is almost identical to the * operator.

Copy link
Member

@AThousandShips AThousandShips left a comment

Choose a reason for hiding this comment

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

LGTM, and good parity, as we don't do any testing for the operators of this type there's no need to add them right now

@AThousandShips
Copy link
Member

We should probably consider doing the same for Transform2D/3D as well, for the same reasoning

@aaronfranke aaronfranke changed the title Add and expose Basis division by float operator Add and expose Basis/Transform2D/3D division by float operator Dec 21, 2023
@aaronfranke
Copy link
Member Author

Updated to add for Transform2D and Transform3D as well.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 4, 2024
@akien-mga akien-mga merged commit 18e9133 into godotengine:master Jan 4, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@aaronfranke aaronfranke deleted the basis-divide branch July 3, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants