servo / euclid

Geometry primitives (basic linear algebra) for Rust
Other
462 stars 102 forks source link

(breaking change) Some Rect and Box adjustments #459

Closed nical closed 4 years ago

nical commented 4 years ago

A few rect/box related adjustments:

nical commented 4 years ago

Let me know if the Rect::try_intersection -> Option<NonEmpty<Self>> change is too annoying to deal with downstream. I can live with the inconsistency.

For WebRender I want to eventually replace most uses of Rect with Box2D anyway because it has less precision loss and is faster for the majority of what we do in WebRender (anything except translating boxes).

nical commented 4 years ago

As discussed, changed the PR so that we have

I don't feel like rebasing the other two commits over the last change, but if having the back-and-forth in the commit log bothers you I can squash it into one.

With this Rect::intersection keeps the same name so it won't cause as much breakage downstream.

nical commented 4 years ago

@bors-servo r+

bors-servo commented 4 years ago

:pushpin: Commit a7b648a has been approved by nical

bors-servo commented 4 years ago

:hourglass: Testing commit a7b648a3e167cba3f445865960f91174d57e9466 with merge de9e4cdc175c780d8ddf661b8b185fc6d0663d3c...

nical commented 4 years ago

Oh noes I meant r=kvark. It's one of these days.

bors-servo commented 4 years ago

:sunny: Test successful - checks-travis Approved by: nical Pushing de9e4cdc175c780d8ddf661b8b185fc6d0663d3c to master...