Making the code easier to understand#2730
Open
YN0HTNA wants to merge 1 commit intojMonkeyEngine:masterfrom
Open
Making the code easier to understand#2730YN0HTNA wants to merge 1 commit intojMonkeyEngine:masterfrom
YN0HTNA wants to merge 1 commit intojMonkeyEngine:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the Javadoc documentation for the clamp, toByte, fromByte, and toInt methods in the ColorRGBA class to provide more detailed descriptions and parameter information. A review comment suggests improving the indentation of the new Javadoc blocks and using standard hyphens for bit ranges to ensure consistency with the existing codebase.
Comment on lines
+831
to
+838
| * Combines four normalized float color channels into a single packed 32-bit integer. | ||
| * Each channel is scaled from [0.0, 1.0] to [0, 255] and packed into 8-bit segments. | ||
| * @param c1 the first channel (occupies bits 24–31) | ||
| * @param c2 the second channel (occupies bits 16–23) | ||
| * @param c3 the third channel (occupies bits 8–15) | ||
| * @param c4 the fourth channel (occupies bits 0–7) | ||
| * @return the four channels combined into a single int | ||
| */ |
Contributor
There was a problem hiding this comment.
The Javadoc comments are missing a leading space for proper alignment. Additionally, using standard hyphens instead of en-dashes for bit ranges is more consistent with the existing codebase (e.g., line 648).
Suggested change
| * Combines four normalized float color channels into a single packed 32-bit integer. | |
| * Each channel is scaled from [0.0, 1.0] to [0, 255] and packed into 8-bit segments. | |
| * @param c1 the first channel (occupies bits 24–31) | |
| * @param c2 the second channel (occupies bits 16–23) | |
| * @param c3 the third channel (occupies bits 8–15) | |
| * @param c4 the fourth channel (occupies bits 0–7) | |
| * @return the four channels combined into a single int | |
| */ | |
| * Combines four normalized float color channels into a single packed 32-bit integer. | |
| * Each channel is scaled from [0.0, 1.0] to [0, 255] and packed into 8-bit segments. | |
| * @param c1 the first channel (occupies bits 24-31) | |
| * @param c2 the second channel (occupies bits 16-23) | |
| * @param c3 the third channel (occupies bits 8-15) | |
| * @param c4 the fourth channel (occupies bits 0-7) | |
| * @return the four channels combined into a single int | |
| */ |
References
- When identifying missing or incorrect Javadoc, provide a code suggestion to fix it directly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I made some edits to the comments in the code just for better clarity of what's going on.