aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/utils.rs b/src/utils.rs
index c9edf16..4cbc398 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -15,6 +15,9 @@ use {
num::One,
};
+/// The trait for real numbers used by Rapier.
+///
+/// This includes `f32`, `f64` and their related SIMD types.
pub trait WReal: SimdRealField<Element = Real> + Copy {}
impl WReal for Real {}
impl WReal for SimdReal {}
@@ -422,9 +425,12 @@ impl WCross<Vector2<SimdReal>> for Vector2<SimdReal> {
}
}
+/// Trait implemented by quaternions.
pub trait WQuat<N> {
+ /// The result of quaternion differentiation.
type Result;
+ /// Compute the differential of `inv(q1) * q2`.
fn diff_conj1_2(&self, rhs: &Self) -> Self::Result;
}