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

Possible invalid documentation #384

Closed
N3xed opened this issue Sep 27, 2019 · 1 comment · Fixed by #385
Closed

Possible invalid documentation #384

N3xed opened this issue Sep 27, 2019 · 1 comment · Fixed by #385

Comments

@N3xed
Copy link

N3xed commented Sep 27, 2019

In the documentation for the function ´geo::Rect::new´ it sais:

Constructor to creates a new rectangle from coordinates, where min denotes to the
coordinates of the bottom-right corner, and max denotes to the coordinates of the
top-left corner

Shouldn't it be that max denotes the top-right and min the bottom-left corner?
Otherwise the validity check wouldn't make much sense:

assert!(min.x <= max.x && min.y <= max.y, "[..]");

So min must be down-left from max (or equal).

@frewsxcv
Copy link
Member

Good catch! Fixed in #385

bors bot added a commit that referenced this issue Sep 30, 2019
385: Fix typo in Rect docs about min/max positions. r=frewsxcv a=frewsxcv

Fixes #384

Co-authored-by: Corey Farwell <coreyf@rwell.org>
@bors bors bot closed this as completed in fd2878c Sep 30, 2019
@bors bors bot closed this as completed in #385 Sep 30, 2019
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 a pull request may close this issue.

2 participants