From 9e23c06281dad712348c7e7c0134cd075f16b17b Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Tue, 4 Dec 2012 08:24:03 +1000 Subject: [PATCH] Remove number cast --- src/quat.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/quat.rs b/src/quat.rs index dc2e53d..945ea00 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -213,7 +213,7 @@ pub impl Quat: Quaternion { */ #[inline(always)] pure fn slerp(&self, other: &Quat, amount: T) -> Quat { - let dot: T = Number::from(self.dot(other)); + let dot = self.dot(other); // if quaternions are close together use `nlerp` let dot_threshold = Number::from(0.9995); @@ -247,7 +247,7 @@ pub impl Quat: Quaternion { let sz2 = z2 * self.s; let sx2 = x2 * self.s; - let _1: T = cast(1); + let _1: T = Number::from(1); Mat3::new(_1 - yy2 - zz2, xy2 - sz2, xz2 + sy2, xy2 + sz2, _1 - xx2 - zz2, yz2 - sx2,