Fix warnings and add comments.

This commit is contained in:
Sébastien Crozet
2022-03-19 16:10:49 +01:00
committed by Sébastien Crozet
parent e2e6fc7871
commit db6a8c526d
23 changed files with 391 additions and 131 deletions

View File

@@ -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;
}