Permalink
Browse files

Update for language changes.

  • Loading branch information...
1 parent fda5dc9 commit e0e4dab1caea0bbfa8a4e9b22b7ae04762d1d5f2 @jdm jdm committed Dec 23, 2012
Showing with 11 additions and 11 deletions.
  1. +7 −7 matrix.rs
  2. +4 −4 matrix2d.rs
View
@@ -109,8 +109,8 @@ impl<T:Copy FuzzyEq Num> Matrix4<T> {
}
pure fn translate(x: &T, y: &T, z: &T) -> Matrix4<T> {
- let _0 = num::from_int(0);
- let _1 = num::from_int(1);
+ let _0 = Num::from_int(0);
+ let _1 = Num::from_int(1);
let matrix = Matrix4(_1, _0, _0, _0,
_0, _1, _0, _0,
_0, _0, _1, _0,
@@ -123,10 +123,10 @@ impl<T:Copy FuzzyEq Num> Matrix4<T> {
pub fn ortho<T:Copy FuzzyEq Num>(left: T, right: T, bottom: T, top: T, near: T, far: T)
-> Matrix4<T> {
- let two: T = num::from_int(2);
- let one: T = num::from_int(1);
- let zero: T = num::from_int(0);
- let minus_two: T = num::from_int(-2);
+ let two: T = Num::from_int(2);
+ let one: T = Num::from_int(1);
+ let zero: T = Num::from_int(0);
+ let minus_two: T = Num::from_int(-2);
let tx = right.add(&left).div(&right.sub(&left)).neg();
let ty = top.add(&bottom).div(&top.sub(&bottom)).neg();
@@ -139,7 +139,7 @@ pub fn ortho<T:Copy FuzzyEq Num>(left: T, right: T, bottom: T, top: T, near: T,
}
pub fn identity<T:Copy FuzzyEq Num>(_0: T) -> Matrix4<T> {
- let _1 = num::from_int(1);
+ let _1 = Num::from_int(1);
return Matrix4(_1, _0, _0, _0,
_0, _1, _0, _0,
_0, _0, _1, _0,
View
@@ -18,17 +18,17 @@ pub impl<T:Copy FuzzyEq Num> Matrix2D<T> {
}
pure fn translate(x: &T, y: &T) -> Matrix2D<T> {
- let _0 = num::from_int(0);
- let _1 = num::from_int(1);
+ let _0 = Num::from_int(0);
+ let _1 = Num::from_int(1);
let matrix = Matrix2D::new(_1, _0,
_0, _1,
*x, *y);
return matrix; // FIXME: This does not multiply yet!!
}
static fn identity() -> Matrix2D<T> {
- let _0 = num::from_int(0);
- let _1 = num::from_int(1);
+ let _0 = Num::from_int(0);
+ let _1 = Num::from_int(1);
return Matrix2D::new(_1, _0,
_0, _1,
_0, _0);

0 comments on commit e0e4dab

Please sign in to comment.