aboutsummaryrefslogtreecommitdiff
path: root/src/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.rs')
-rw-r--r--src/utils.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/utils.rs b/src/utils.rs
index 3f76c8b..a6c4ef5 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,6 +1,5 @@
//! Miscellaneous utilities.
-use crate::dynamics::RigidBodyHandle;
use na::{Matrix3, Point2, Point3, Scalar, SimdRealField, Vector2, Vector3};
use num::Zero;
use simba::simd::SimdValue;
@@ -658,11 +657,8 @@ impl Drop for FlushToZeroDenormalsAreZeroFlags {
}
}
-pub(crate) fn other_handle(
- pair: (RigidBodyHandle, RigidBodyHandle),
- handle: RigidBodyHandle,
-) -> RigidBodyHandle {
- if pair.0 == handle {
+pub(crate) fn select_other<T: PartialEq>(pair: (T, T), elt: T) -> T {
+ if pair.0 == elt {
pair.1
} else {
pair.0