diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 00000000..e69de29b diff --git a/src/vec_spec.rs b/src/vec_spec.rs index 82a8c3f2..9b4962c0 100644 --- a/src/vec_spec.rs +++ b/src/vec_spec.rs @@ -1,6 +1,6 @@ use std::vec::{VecIterator, VecMutIterator}; use std::iterator::FromIterator; -use std::num::{Zero, One, abs}; +use std::num::{Zero, One}; use traits::basis::Basis; use traits::cross::Cross; use traits::division_ring::DivisionRing; @@ -69,7 +69,7 @@ impl> Basis for Vec2 { f(Vec2::new([-self.at[1], self.at[0].clone()])) } } -impl +impl Basis for Vec3 { #[inline(always)] @@ -84,7 +84,7 @@ Basis for Vec3 fn orthonormal_subspace_basis(&self, f: &fn(Vec3)) { let a = - if abs(self.at[0].clone()) > abs(self.at[1].clone()) + if self.at[0].clone().abs() > self.at[1].clone().abs() { Vec3::new([self.at[2].clone(), Zero::zero(), -self.at[0]]).normalized() } else { Vec3::new([Zero::zero(), -self.at[2], self.at[1].clone()]).normalized() };