Closed alexkirsz closed 3 years ago
:umbrella: The latest upstream changes (presumably #481) made this pull request unmergeable. Please resolve the merge conflicts.
I'm a tad scheptical of adding ceiling_division to euclid. What is your use case for it? It's a bit unclear what the semantics should be with negative numbers and more generally what it means in the context of linear algebra.
One use case where I needed this was for filling a grid of size MxN pixels with tiles of size OxP, where you'll need ceiling_div(M, O)
xceiling_div(N, P)
tiles.
IMHO it's a bit too niche for inclusion in euclid and easy enough to implement outside of this crate.
I can totally see that. In fact, now that we have component_div
, it can more easily be implemented with:
(a + b - Vector2::one()).component_div(b)
I'll close this PR and the associated issue. Thanks for taking the time to review and discuss this! 😄
Thanks for your understanding and contribution.
Rest of the fix for #480 (#481 is the first part).
I implemented this in its own PR in case there are issues with this particular API/implementation, while I think #481 is simple enough not to be controversial.