diff --git a/.travis.yml b/.travis.yml index 9c1c3f6..349ccaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,3 +21,9 @@ script: - cargo test --verbose --features serialization - echo "Building without std" - cargo build --verbose --no-default-features + - echo "Testing with cgmath" + - cargo build --verbose --features impl-cgmath + - cargo test --verbose --features impl-cgmath + - echo "Testing with nalgebra" + - cargo build --verbose --features impl-nalgebra + - cargo test --verbose --features impl-nalgebra diff --git a/src/nalgebra.rs b/src/nalgebra.rs index 5a9c5f1..c13f4c7 100644 --- a/src/nalgebra.rs +++ b/src/nalgebra.rs @@ -1,9 +1,5 @@ use alga::general::{ClosedAdd, ClosedDiv, ClosedMul, ClosedSub}; -use nalgebra::{ - DefaultAllocator, DimName, Point, Scalar, Vector, Vector1, Vector2, Vector3, Vector4, Vector5, - Vector6 -}; -use nalgebra::allocator::Allocator; +use nalgebra::{Scalar, Vector, Vector1, Vector2, Vector3, Vector4, Vector5, Vector6}; use num_traits as nt; use std::ops::Mul; @@ -12,7 +8,7 @@ use crate::interpolate::{Interpolate, Linear, Additive, One, cubic_hermite_def}; macro_rules! impl_interpolate_vector { ($($t:tt)*) => { // implement Linear - impl Linear for $($t)* where T: Scalar + ClosedMul + ClosedDiv { + impl Linear for $($t)* where T: Scalar + ClosedAdd + ClosedSub + ClosedMul + ClosedDiv { #[inline(always)] fn outer_mul(self, t: T) -> Self { self * t @@ -54,19 +50,3 @@ impl_interpolate_vector!(Vector3); impl_interpolate_vector!(Vector4); impl_interpolate_vector!(Vector5); impl_interpolate_vector!(Vector6); - -impl Linear for Point -where D: DimName, - DefaultAllocator: Allocator, - >::Buffer: Copy, - T: Scalar + ClosedDiv + ClosedMul { - #[inline(always)] - fn outer_mul(self, t: T) -> Self { - self * t - } - - #[inline(always)] - fn outer_div(self, t: T) -> Self { - self / t - } -}