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
Rectangle in Math needs to specify y down #15943
Comments
Removed Type-Defect label. |
cc @efortuna. |
I agree that this is very surprising for a Rectangle in dart:math. |
I'm 90% certain we had this discussion back when the code was going in, and you and Florian opted to have "graphics coordinates" in the default case. I can dredge up the email thread.... Back when we were writing this code I did a survey of other language's Rectangle classes, and by and large they used the computer graphics coordinates. The one exception being a specialized math third-party Python package, but again in the default Python rectangle y was down. We could update the documentation... or change the implementation... I can see rationale for both sides, but adding the Cartesian coordinates does complicate the implementation (not that that should be the determining factor). |
Even when I know it is "y down" coordinates, it still keeps surprising me :) |
This comment was originally written by ti...@xythings.com Documentation is the main thing and I'm happy enough with it just being clear. On a more general level why is there a Rectangle class, and why is it in Math? If the package was math.graphics or graphics.math everything would be fine but |
This issue was originally filed by ti...@xythings.com
_RectangleBase documents y being down but this is not shown in Rectangle
Appearing in Math and not a graphics package it would be reasonable to assume y up for a Rectangle.
https://api.dartlang.org/docs/channels/stable/latest/dart_math/Rectangle.html
The text was updated successfully, but these errors were encountered: