godotengine / godotengine/godot-docs
PackedArray description on resize method isn't as clear as Array's description of resize
- Dominant language
- reStructuredText
- Stars
- 5.7k
- Forks
- 3.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 25
Description
**Your Godot version:** v4.7.stable.official [5b4e0cb0f]
**Issue description:** I've noticed there's differences between `Array.resize` and the `PackedArray`'s resize method, where the first paragraph isn't as clear as `Array.resize`, even though from functional stand point, both `Array.resize` and `PackedArray`'s resize methods have the same outcome (resizes your array to the new size you've pass as an argument), it's true that you can't make `PackedArray` types `read_only` as you would with `Array` type, (as `PackedArray` is a `Vector` under the hood), and there's no `make_read_only` & `is_read_only` to be found, but this argument doesn't effect the first paragraph, it only affects the second, which talks about possible return values.
**URL to the documentation page (if already existing):**
Array's resize method: [Array](https://docs.godotengine.org/en/stable/classes/class_array.html#class-array-method-resize).
PackedArray resize method: [packedbytearray](https://docs.godotengine.org/en/stable/classes/class_packedbytearray.html#class-packedbytearray-method-resize), [packedcolorarray](https://docs.godotengine.org/en/stable/classes/class_packedcolorarray.html#class-packedcolorarray-method-resize), [packedfloat32array](https://docs.godotengine.org/en/stable/classes/class_packedfloat32array.html#class-packedfloat32array-method-resize), [packedfloat64array](https://docs.godotengine.org/en/stable/classes/class_packedfloat64array.html#class-packedfloat64array-method-resize), [packedint32array](https://docs.godotengine.org/en/stable/classes/class_packedint32array.html#class-packedint32array-method-resize), [packedint64array](https://docs.godotengine.org/en/stable/classes/class_packedint64array.html#class-packedint64array-method-resize), [packedstringarray](https://docs.godotengine.org/en/stable/classes/class_packedstringarray.html#class-packedstringarray-method-resize), [packedvector2array](https://docs.godotengine.org/en/stable/classes/class_packedvector2array.html#class-packedvector2array-method-resize), [packedvector3array](https://docs.godotengine.org/en/stable/classes/class_packedvector3array.html#class-packedvector3array-method-resize), [packedvector4array](https://docs.godotengine.org/en/stable/classes/class_packedvector4array.html#class-packedvector4array-method-resize).
**Possible solution**: Adopting a better version to all of these `resize` method descriptions would be best, and I think (in my opinion) that Array's `resize` method description is a lot clearer than what's found in PackedArray's one.
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the Array.resize description with the resize entries on the linked PackedByteArray, PackedColorArray, PackedFloat32Array, PackedFloat64Array, PackedInt32Array, PackedInt64Array, PackedStringArray, PackedVector2Array, PackedVector3Array, and PackedVector4Array pages. Align the PackedArray descriptions with the clearer wording while preserving the documented differences in return behavior, then verify all linked pages are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100