From 16921efb54c46b40f73081f10f4b4f1ef901cf44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludvig=20B=C3=B6klin?= Date: Wed, 10 Feb 2021 16:11:07 +0100 Subject: [PATCH] Add note about to_quat() being a cheap copy operation --- common/src/comp/ori.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/comp/ori.rs b/common/src/comp/ori.rs index 86e02448e1..351db07066 100644 --- a/common/src/comp/ori.rs +++ b/common/src/comp/ori.rs @@ -38,6 +38,10 @@ impl Ori { /// Look direction as a vector (no pedantic normalization performed) pub fn look_vec(self) -> Vec3 { self.to_quat() * *Dir::default() } + /// Get the internal quaternion representing the rotation from + /// `Dir::default()` to this orientation. + /// + /// The operation is a cheap copy. pub fn to_quat(self) -> Quaternion { debug_assert!(self.is_normalized()); self.0