Skip to content

Conversation

@waywardmonkeys
Copy link
Contributor

No description provided.

Copy link
Contributor

@dfrg dfrg left a comment

Choose a reason for hiding this comment

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

Some minor bikeshedding, otherwise LGTM.

src/line.rs Outdated
/// Return a copy of this `Line` in the opposite direction.
#[must_use]
#[inline]
pub fn flipped(&self) -> Line {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I feel like reversed is a slightly better name for this.

Also, it might be helpful if the comment describes what it does: “Returns a copy of this Line with the end points swapped so that it points in the opposite direction.”

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll revise the comment.

The name matches the other flipped that I've added in a previous PR, Arc::flipped.

I think I like reversed better though as well, so will update both.

@waywardmonkeys waywardmonkeys changed the title Add Line::flipped, Line::midpoint Add Line::reversed, Line::midpoint, rename Arc::flipped Sep 4, 2024
@waywardmonkeys
Copy link
Contributor Author

@dfrg Updated to also rename Arc::flipped ... what do you think?

@dfrg
Copy link
Contributor

dfrg commented Sep 4, 2024

All looks good, thanks!

@waywardmonkeys waywardmonkeys added this pull request to the merge queue Sep 4, 2024
Merged via the queue into linebender:main with commit 2cb3ec6 Sep 4, 2024
@waywardmonkeys waywardmonkeys deleted the utility-funcs branch September 4, 2024 15:02
@richard-uk1
Copy link
Collaborator

If there are 2 plausible names, feel free to add the less good one as a doc alias :)

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 this pull request may close these issues.

3 participants