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

doc(emath): Add top_left as an alias for left_top, etc. #4689

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

zkrising
Copy link
Contributor

What

Adds #[doc(alias = "top_left")] as an alias for left_top, and so on for right_top, right_bottom, left_bottom.

Why

Extremely minor doc-only change, but I keep going to type "top left" to look for the top left of a rectangle.
I'm unsure whether this is just a british-english thing or an english-in-general thing, but top left corner is far more common than left top corner.
These doc aliases don't conflict with anything, and mean that rust-analyzer will suggest the correct function when I search for the wrong thing.

This improves ergonomics and discoverability in my opinion, even if not by much.

Extremely minor annoyance, but I keep getting confused by this
as "top left" is much more natural in english.
Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, makes sense!

The reason for the order is for it to be consistently X,Y order everywhere, even though I agree "right_top" sounds weird in english

@emilk emilk added docs and examples Improving and adding documentation and examples emath Relates to the emath crate labels Jun 23, 2024
@emilk emilk merged commit 8cef6fc into emilk:master Jun 23, 2024
20 of 21 checks passed
@zkrising zkrising deleted the zk/topleft_alias branch June 23, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs and examples Improving and adding documentation and examples emath Relates to the emath crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants