bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Clarify GlobalTransform::transform_point

Open masonk opened this issue 1 year ago • 3 comments

The existing doc comment for GlobalTransform::transform_point is unclear, or, arguably, incorrect. https://github.com/bevyengine/bevy/discussions/8501 also mentions this.

Additionally, a user reading the doc for transform_point might be looking for one of the three other transforms that I mentioned in this doc comment.

masonk avatar Jul 13 '24 14:07 masonk

Someone should check my logic :).

masonk avatar Jul 13 '24 14:07 masonk

Your logic is correct, Though I'd like to have the whole structure doc saying that it maintains transform from local to global space. Keep function doc changes and add structure doc too.

Hexorg avatar Jul 13 '24 18:07 Hexorg

  • I updated transform.rs that had similarly incorrect information
  • Per #, made a pass on the struct comment
  • Per https://github.com/bevyengine/bevy/pull/14292#discussion_r1676947108, I converted the comments into doctests.

masonk avatar Jul 13 '24 22:07 masonk