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

Implement division operation for Rectangle, Size and Vector #2767

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

Conversation

airstrike
Copy link
Contributor

Implement std::ops::Div for Rectangle, Size and Vector to complement existing multiplication operations.

This way users can avoid the roundabout foo * (1.0 / scaling) to scale a Vector, for example.

I thought impl<T> std::ops::Div<Vector<T>> for Rectangle<T> was a bit weird conceptually, but added it for consistency since we already had impl<T> std::ops::Mul<Vector<T>> for Rectangle<T>.

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