Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove some method names that assume y pointing down #363
Conversation
|
This is an incomplete alternative to #361 and #353. I don't have good ideas for SideOffsets2D member names that are agnostic to the y axis orientation without being awful, but since I'm unlikely to get consensus on either of #361 and #353, I think that I might propose this one and call it a day. r? @kvark and/or @Manishearth |
|
Can we have SideOffsets just storing things like x0, x1, y0, y1? |
|
The second commit renames SideOffsets2D's top/right/bottom/left into y0/x1/y1x0. CaveatOne would think that it would make more sense for the structure and parameters to be laid out in the order "x0,y0, x1, y1" or "x0, x1, y0 y1", except that doing this means the order of the parameters
So far, @kvark, @Manishearth and @SimonSapin have expressed various levels of agreement about doing something like this in principle (ranging from, "OK" to "meh, OK". Personally I am not a huge fan but it's good enough for me and makes euclid agnostic to the orientation of the y-axis which is good. I think that this can be a controversial change so don't hesitate to cc people who use euclid and side offsets a lot. |
|
How about removing |
This would be nice except for the extra PhantomData field which would have to be passed every time. |
Remove some Rect method names that assume y pointing down The first (uncontroversial) part of #363. This removes `Rect::to_right` and similar methods but leaves SideOffsets untouched. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/euclid/364) <!-- Reviewable:end -->
|
|
nical commentedJul 11, 2019
•
edited by larsbergstrom
With this PR, the only things in euclid that dictate the direction of the y axis are:
Rect::inner_rect/outer_rectBox2D::inner_box/outer_boxThis change is