diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-03-19 16:10:49 +0100 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2022-03-20 21:49:16 +0100 |
| commit | db6a8c526d939a125485c89cfb6e540422fe6b4b (patch) | |
| tree | 32738172c6bd27e07ed9a4b8f90f5fbbfc07fd5e /src/utils.rs | |
| parent | e2e6fc787112ab35a3d4858aa2cf83fcf41c16a2 (diff) | |
| download | rapier-db6a8c526d939a125485c89cfb6e540422fe6b4b.tar.gz rapier-db6a8c526d939a125485c89cfb6e540422fe6b4b.tar.bz2 rapier-db6a8c526d939a125485c89cfb6e540422fe6b4b.zip | |
Fix warnings and add comments.
Diffstat (limited to 'src/utils.rs')
| -rw-r--r-- | src/utils.rs | 6 |
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; } |
