Skip to content

Commit 122169f

Browse files
nstoddardkvark
authored andcommitted
Add UlpsEq trait bounds to fix compilation with git version of cgmath
Unless more changes are made to cgmath before 0.18 is released, this should make this library compatible with that version.
1 parent e4997c0 commit 122169f

File tree

1 file changed

+6
-5
lines changed
  • src/algorithm/minkowski/gjk

1 file changed

+6
-5
lines changed

src/algorithm/minkowski/gjk/mod.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::ops::{Neg, Range};
99
use cgmath::BaseFloat;
1010
use cgmath::prelude::*;
1111
use cgmath::num_traits::NumCast;
12+
use cgmath::UlpsEq;
1213

1314
use self::simplex::{Simplex, SimplexProcessor2, SimplexProcessor3};
1415
use crate::{CollisionStrategy, Contact};
@@ -109,7 +110,7 @@ where
109110
PL: Primitive<Point = P>,
110111
PR: Primitive<Point = P>,
111112
SP: SimplexProcessor<Point = P>,
112-
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
113+
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
113114
TL: Transform<P>,
114115
TR: Transform<P>,
115116
{
@@ -277,7 +278,7 @@ where
277278
PL: Primitive<Point = P>,
278279
PR: Primitive<Point = P>,
279280
SP: SimplexProcessor<Point = P>,
280-
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
281+
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
281282
TL: Transform<P>,
282283
TR: Transform<P>,
283284
{
@@ -365,7 +366,7 @@ where
365366
) -> Option<Contact<P>>
366367
where
367368
P: EuclideanSpace<Scalar = S>,
368-
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
369+
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
369370
PL: Primitive<Point = P>,
370371
PR: Primitive<Point = P>,
371372
TL: Transform<P>,
@@ -415,7 +416,7 @@ where
415416
) -> Option<Contact<P>>
416417
where
417418
P: EuclideanSpace<Scalar = S>,
418-
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
419+
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
419420
PL: Primitive<Point = P>,
420421
PR: Primitive<Point = P>,
421422
TL: Transform<P>,
@@ -479,7 +480,7 @@ where
479480
) -> Option<S>
480481
where
481482
P: EuclideanSpace<Scalar = S>,
482-
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
483+
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
483484
PL: Primitive<Point = P>,
484485
PR: Primitive<Point = P>,
485486
TL: Transform<P>,

0 commit comments

Comments
 (0)