diff --git a/src/vec.rs b/src/vec.rs index 578087f..0f03da7 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -8,7 +8,6 @@ use std::cmp::FuzzyEq; use dim::{Dimensional, ToPtr}; use funs::exponential::Exp; -use num::cast::*; use num::default_eq::DefaultEq; use num::kinds::Number; @@ -207,7 +206,7 @@ pub impl Vec2: GeometricVector { #[inline(always)] pure fn normalize(&self) -> Vec2 { - let mut n: T = cast(1); + let mut n: T = Number::from(1); n /= self.length(); return self.mul_t(n); } @@ -385,7 +384,7 @@ pub impl Vec3: GeometricVector { #[inline(always)] pure fn normalize(&self) -> Vec3 { - let mut n: T = cast(1); + let mut n: T = Number::from(1); n /= self.length(); return self.mul_t(n); } @@ -563,7 +562,7 @@ pub impl Vec4: GeometricVector { #[inline(always)] pure fn normalize(&self) -> Vec4 { - let mut n: T = cast(1); + let mut n: T = Number::from(1); n /= self.length(); return self.mul_t(n); }