Clean up some type projections

This commit is contained in:
Brendan Zabarauskas 2017-05-02 21:15:32 +10:00
parent bb7d342126
commit cb31bbdef6
2 changed files with 4 additions and 4 deletions

View file

@ -32,8 +32,8 @@ use vector::{Vector2, Vector3};
/// creates a circular motion, and preserves at least one point in the space.
pub trait Rotation<P: EuclideanSpace>: Sized + Copy + One where
// FIXME: Ugly type signatures - blocked by rust-lang/rust#24092
Self: ApproxEq<Epsilon = <P as EuclideanSpace>::Scalar>,
<P as EuclideanSpace>::Scalar: BaseFloat,
Self: ApproxEq<Epsilon = P::Scalar>,
P::Scalar: BaseFloat,
Self: iter::Product<Self>,
{
/// Create a rotation to a given direction with an 'up' vector.

View file

@ -64,9 +64,9 @@ pub struct Decomposed<V: VectorSpace, R> {
}
impl<P: EuclideanSpace, R: Rotation<P>> Transform<P> for Decomposed<P::Diff, R>
where <P as EuclideanSpace>::Scalar: BaseFloat,
where P::Scalar: BaseFloat,
// FIXME: Investigate why this is needed!
<P as EuclideanSpace>::Diff: VectorSpace
P::Diff: VectorSpace
{
#[inline]
fn one() -> Decomposed<P::Diff, R> {