From d4ee6513058a4c941d819348f20d78f3e55c2c67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Crozet?= Date: Thu, 3 Oct 2013 00:45:50 +0200 Subject: [PATCH] Move the Basis trait inheritance from VecExt to AlgebraicVecExt. The Basis trait cannot be implemented if the vector is not algebraic anyway. --- src/traits/structure.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/traits/structure.rs b/src/traits/structure.rs index 2343acd3..d928f711 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -36,13 +36,13 @@ pub trait AlgebraicVec: Vec + Norm { /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// operations on vectors. -pub trait VecExt: Vec + Basis + Indexable + Iterable + Round + +pub trait VecExt: Vec + Indexable + Iterable + Round + UniformSphereSample + ScalarAdd + ScalarSub + Bounded + Orderable { } /// Trait grouping uncommon, low-level and borderline (from the mathematical point of view) /// operations on vectors. -pub trait AlgebraicVecExt: AlgebraicVec + VecExt { } +pub trait AlgebraicVecExt: AlgebraicVec + VecExt + Basis { } impl + Add + Neg + Zero + Eq + Mul + Div + Dot> Vec for V { } @@ -50,11 +50,11 @@ Vec for V { } impl + Norm> AlgebraicVec for V { } impl + Basis + Indexable + Iterable + Round + + V: Vec + Indexable + Iterable + Round + UniformSphereSample + ScalarAdd + ScalarSub + Bounded + Orderable> VecExt for V { } -impl + VecExt> AlgebraicVecExt for V { } +impl + VecExt + Basis> AlgebraicVecExt for V { } /// Trait of vectors which can be converted to another vector. Used to change the type of a vector /// components.