-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Several edits to the GDScript docs #43959
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will give this a ✔️ because I don't see any obvious problems, and also the documentation about int/truncation/etc is good.
However, I don't necessarily approve of moving the comments to the end of the lines, the GDScript style guide doesn't have an opinion on this, and if I had to pick I'd say the old way is better since it would be more consistent with long comments that definitely belong on their own line. Anyway, it's up to @godotengine/documentation to decide which way is preferred.
The fact is that the examples in the documentation are already done in different styles. I was just trying to reduce this chaos. Examples
godot/modules/gdscript/doc_classes/@GDScript.xml Lines 253 to 254 in 339b646
godot/modules/gdscript/doc_classes/@GDScript.xml Lines 279 to 280 in 339b646
godot/modules/gdscript/doc_classes/@GDScript.xml Lines 292 to 293 in 339b646
I left the really long comments on a separate line, for example: godot/modules/gdscript/doc_classes/@GDScript.xml Lines 70 to 71 in bf96056
Multiline examples IMO should be as compact as possible: godot/modules/gdscript/doc_classes/@GDScript.xml Lines 1124 to 1129 in 339b646
godot/modules/gdscript/doc_classes/@GDScript.xml Lines 1115 to 1117 in bf96056
|
Thanks! |
Cherry-picked for 3.2.4. |
int
/float
.I also noticed the following problems (I have not looked for relevant issues yet):
Some functions return a type depending on the type of the argument(s), while others always return
float
:At the same time, the documentation indicates that the function returns
float
, for examplefloat abs(s: float)
, although these are like two functions (int abs(s: int)
andfloat abs(s: float)
).The
print()
function does not distinguish between "the same"int
andfloat
:Accordingly, the wording
print(EXPR) # Prints 1
used in some examples doesn't answer whatEXPR
is:1
or1.0
.