Closed andrew-aaron closed 3 months ago
It should actually be range(round(2.2))
as running:
for i in 2.6:
print(i)
prints:
0
1
2
but this is incorrect as this will output "0, 1"
The right edge is excluded, see https://github.com/godotengine/godot-docs/pull/9539#pullrequestreview-2136731495.
but this is incorrect as this will output "0, 1"
The documentation seems to be correct here. I'm not sure how this result was achieved.
Everyone here is correct. I didn't check myself thoroughly enough. I got confused as I used range(). I then checked the "in 2.2" example. ceil() pushes 2.2 to 3, therefore the last value will be 2. My bad everyone.
Your Godot version: Docs 4.2
Issue description: The section about for loops says:
but this is incorrect as this will output "0, 1" in the Output console. It should be:
URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/tutorials/scripting/gdscript/gdscript_basics.html