Skip to content

Commit

Permalink
Add UlpsEq trait bounds to fix compilation with git version of cgmath
Browse files Browse the repository at this point in the history
Unless more changes are made to cgmath before 0.18 is released, this should make this library compatible with that version.
  • Loading branch information
nstoddard authored and kvark committed Jun 18, 2020
1 parent e4997c0 commit 122169f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/algorithm/minkowski/gjk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use std::ops::{Neg, Range};
use cgmath::BaseFloat;
use cgmath::prelude::*;
use cgmath::num_traits::NumCast;
use cgmath::UlpsEq;

use self::simplex::{Simplex, SimplexProcessor2, SimplexProcessor3};
use crate::{CollisionStrategy, Contact};
Expand Down Expand Up @@ -109,7 +110,7 @@ where
PL: Primitive<Point = P>,
PR: Primitive<Point = P>,
SP: SimplexProcessor<Point = P>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
TL: Transform<P>,
TR: Transform<P>,
{
Expand Down Expand Up @@ -277,7 +278,7 @@ where
PL: Primitive<Point = P>,
PR: Primitive<Point = P>,
SP: SimplexProcessor<Point = P>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
TL: Transform<P>,
TR: Transform<P>,
{
Expand Down Expand Up @@ -365,7 +366,7 @@ where
) -> Option<Contact<P>>
where
P: EuclideanSpace<Scalar = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
PL: Primitive<Point = P>,
PR: Primitive<Point = P>,
TL: Transform<P>,
Expand Down Expand Up @@ -415,7 +416,7 @@ where
) -> Option<Contact<P>>
where
P: EuclideanSpace<Scalar = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
PL: Primitive<Point = P>,
PR: Primitive<Point = P>,
TL: Transform<P>,
Expand Down Expand Up @@ -479,7 +480,7 @@ where
) -> Option<S>
where
P: EuclideanSpace<Scalar = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S>,
P::Diff: Neg<Output = P::Diff> + InnerSpace + Zero + Array<Element = S> + UlpsEq,
PL: Primitive<Point = P>,
PR: Primitive<Point = P>,
TL: Transform<P>,
Expand Down

0 comments on commit 122169f

Please sign in to comment.