cleaned up formatting in matrix.rs in both test and bench

This commit is contained in:
Colin Sherratt 2013-11-26 02:30:30 -05:00
parent 29104f2375
commit bfd2729c29
2 changed files with 35 additions and 60 deletions

View file

@ -29,11 +29,6 @@ pub mod mat2 {
y: Vec2 { x: 2.0, y: 4.0 } }; y: Vec2 { x: 2.0, y: 4.0 } };
pub static B: Mat2<f32> = Mat2 { x: Vec2 { x: 2.0, y: 4.0 }, pub static B: Mat2<f32> = Mat2 { x: Vec2 { x: 2.0, y: 4.0 },
y: Vec2 { x: 3.0, y: 5.0 } }; y: Vec2 { x: 3.0, y: 5.0 } };
pub static C: Mat2<f32> = Mat2 { x: Vec2 { x: 2.0, y: 1.0 },
y: Vec2 { x: 1.0, y: 2.0 } };
pub static V: Vec2<f32> = Vec2 { x: 1.0, y: 2.0 };
pub static F: f32 = 0.5;
} }
pub mod mat3 { pub mod mat3 {
@ -47,15 +42,6 @@ pub mod mat3 {
pub static B: Mat3<f32> = Mat3 { x: Vec3 { x: 2.0, y: 5.0, z: 8.0 }, pub static B: Mat3<f32> = Mat3 { x: Vec3 { x: 2.0, y: 5.0, z: 8.0 },
y: Vec3 { x: 3.0, y: 6.0, z: 9.0 }, y: Vec3 { x: 3.0, y: 6.0, z: 9.0 },
z: Vec3 { x: 4.0, y: 7.0, z: 10.0 } }; z: Vec3 { x: 4.0, y: 7.0, z: 10.0 } };
pub static C: Mat3<f32> = Mat3 { x: Vec3 { x: 2.0, y: 4.0, z: 6.0 },
y: Vec3 { x: 0.0, y: 2.0, z: 4.0 },
z: Vec3 { x: 0.0, y: 0.0, z: 1.0 } };
pub static D: Mat3<f32> = Mat3 { x: Vec3 { x: 3.0, y: 2.0, z: 1.0 },
y: Vec3 { x: 2.0, y: 3.0, z: 2.0 },
z: Vec3 { x: 1.0, y: 2.0, z: 3.0 } };
pub static V: Vec3<f32> = Vec3 { x: 1.0, y: 2.0, z: 3.0 };
pub static F: f32 = 0.5;
} }
pub mod mat4 { pub mod mat4 {
@ -71,17 +57,6 @@ pub mod mat4 {
y: Vec4 { x: 3.0, y: 7.0, z: 11.0, w: 15.0 }, y: Vec4 { x: 3.0, y: 7.0, z: 11.0, w: 15.0 },
z: Vec4 { x: 4.0, y: 8.0, z: 12.0, w: 16.0 }, z: Vec4 { x: 4.0, y: 8.0, z: 12.0, w: 16.0 },
w: Vec4 { x: 5.0, y: 9.0, z: 13.0, w: 17.0 } }; w: Vec4 { x: 5.0, y: 9.0, z: 13.0, w: 17.0 } };
pub static C: Mat4<f32> = Mat4 { x: Vec4 { x: 3.0, y: 2.0, z: 1.0, w: 1.0 },
y: Vec4 { x: 2.0, y: 3.0, z: 2.0, w: 2.0 },
z: Vec4 { x: 1.0, y: 2.0, z: 3.0, w: 3.0 },
w: Vec4 { x: 0.0, y: 1.0, z: 1.0, w: 0.0 } };
pub static D: Mat4<f32> = Mat4 { x: Vec4 { x: 4.0, y: 3.0, z: 2.0, w: 1.0 },
y: Vec4 { x: 3.0, y: 4.0, z: 3.0, w: 2.0 },
z: Vec4 { x: 2.0, y: 3.0, z: 4.0, w: 3.0 },
w: Vec4 { x: 1.0, y: 2.0, z: 3.0, w: 4.0 } };
pub static V: Vec4<f32> = Vec4 { x: 1.0, y: 2.0, z: 3.0, w: 4.0 };
pub static F: f32 = 0.5;
} }
#[bench] #[bench]