Remove number cast
This commit is contained in:
parent
53fc6d15ab
commit
9e23c06281
1 changed files with 2 additions and 2 deletions
|
@ -213,7 +213,7 @@ pub impl<T:Copy Float Exp Extent InvTrig> Quat<T>: Quaternion<T> {
|
||||||
*/
|
*/
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pure fn slerp(&self, other: &Quat<T>, amount: T) -> Quat<T> {
|
pure fn slerp(&self, other: &Quat<T>, amount: T) -> Quat<T> {
|
||||||
let dot: T = Number::from(self.dot(other));
|
let dot = self.dot(other);
|
||||||
|
|
||||||
// if quaternions are close together use `nlerp`
|
// if quaternions are close together use `nlerp`
|
||||||
let dot_threshold = Number::from(0.9995);
|
let dot_threshold = Number::from(0.9995);
|
||||||
|
@ -247,7 +247,7 @@ pub impl<T:Copy Float Exp Extent InvTrig> Quat<T>: Quaternion<T> {
|
||||||
let sz2 = z2 * self.s;
|
let sz2 = z2 * self.s;
|
||||||
let sx2 = x2 * 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,
|
Mat3::new(_1 - yy2 - zz2, xy2 - sz2, xz2 + sy2,
|
||||||
xy2 + sz2, _1 - xx2 - zz2, yz2 - sx2,
|
xy2 + sz2, _1 - xx2 - zz2, yz2 - sx2,
|
||||||
|
|
Loading…
Reference in a new issue