mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Add note about to_quat() being a cheap copy operation
This commit is contained in:
parent
990198cd87
commit
74badd3dbd
@ -38,6 +38,10 @@ impl Ori {
|
|||||||
/// Look direction as a vector (no pedantic normalization performed)
|
/// Look direction as a vector (no pedantic normalization performed)
|
||||||
pub fn look_vec(self) -> Vec3<f32> { self.to_quat() * *Dir::default() }
|
pub fn look_vec(self) -> Vec3<f32> { 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<f32> {
|
pub fn to_quat(self) -> Quaternion<f32> {
|
||||||
debug_assert!(self.is_normalized());
|
debug_assert!(self.is_normalized());
|
||||||
self.0
|
self.0
|
||||||
|
Loading…
Reference in New Issue
Block a user