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

Mention inverse of hex functions in Color #93218

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

thmasn
Copy link
Contributor

@thmasn thmasn commented Jun 16, 2024

the naming of methods converting to hex color and from hex color is different.
since finding the inverse is not obvious, it should be mentioned in the docs.

@thmasn thmasn requested a review from a team as a code owner June 16, 2024 06:53
@Chaosus Chaosus added this to the 4.3 milestone Jun 16, 2024
@thmasn
Copy link
Contributor Author

thmasn commented Jun 16, 2024

alternatively, the methods could have obviously named synonyms, like "to_hex()" and "from_hex()", but this would mean more code with almost the same usability outcome.

@AThousandShips AThousandShips changed the title mention inverse of hex functions in Color.xml Mention inverse of hex functions in Color Jun 16, 2024
@Mickeon
Copy link
Contributor

Mickeon commented Jun 16, 2024

I would suggest saying "opposite" instead of "inverse".

@thmasn
Copy link
Contributor Author

thmasn commented Jun 16, 2024

sure! other wordings are possible:

  • this method is the inverse of ...
  • this method is the opposite of ...
  • to revert, use ...

it seems different wordings are currently used in the docs:
"This is the inverse of ...":
PackedByteArray String Node

"This method is the opposite of ..."
String StringName

"See also ... which performs the opposite operation."
Color

@fire
Copy link
Member

fire commented Jun 16, 2024

You can also use the word "undo" like undo the function. Math has several words that mean almost the same [inverse, reverse, undo, opposite].

Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

I have no opinion on which is the exact wording of "inverse". I prefer undo, but someone else can pick the "color of the shed".

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

"This method is the opposite of ..."
String StringName

I wrote a good chunk of these so admittedly there's a general inconsistency around the place.

"Undo" is probably the most uncommon way to refer to this concept, though.

@akien-mga akien-mga merged commit f6bd880 into godotengine:master Jun 17, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants