Skip to content

Commit 7c2289c

Browse files
authored
Clarify GlobalTransform::to_isometry doc (#19645)
# Objective - to_isometry is not a direct conversion, it involves computation. the docs could be clearer ## Solution - Improve docs ## Testing - its docs
1 parent 7237c21 commit 7c2289c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/bevy_transform/src/components/global_transform.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,9 @@ impl GlobalTransform {
139139
}
140140
}
141141

142-
/// Returns the isometric part of the transformation as an [isometry]. Any scaling done by the
143-
/// transformation will be ignored.
142+
/// Computes a Scale-Rotation-Translation decomposition of the transformation and returns
143+
/// the isometric part as an [isometry]. Any scaling done by the transformation will be ignored.
144+
/// Note: this is a somewhat costly and lossy conversion.
144145
///
145146
/// The transform is expected to be non-degenerate and without shearing, or the output
146147
/// will be invalid.

0 commit comments

Comments
 (0)