From 6468360edb4a215b272a8462f07653865b8cb9a3 Mon Sep 17 00:00:00 2001 From: "Franklin Delehelle (Vampire.local)" Date: Wed, 21 May 2014 13:08:04 +0200 Subject: [PATCH] Compile with nightlies --- src/structs/dmat.rs | 8 +++----- src/structs/dvec.rs | 11 ++++------- src/structs/iso.rs | 4 +--- src/structs/mat.rs | 2 -- src/structs/mod.rs | 5 +++++ src/structs/rot.rs | 8 +++----- src/structs/vec.rs | 2 -- 7 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/structs/dmat.rs b/src/structs/dmat.rs index 8f905d78..6b66bb29 100644 --- a/src/structs/dmat.rs +++ b/src/structs/dmat.rs @@ -12,8 +12,6 @@ use traits::operations::{Inv, Transpose, Mean, Cov}; use traits::structure::{Cast, ColSlice, RowSlice, Eye, Indexable}; use std::fmt::{Show, Formatter, Result}; -#[doc(hidden)] -mod metal; /// Matrix with dimensions unknown at compile-time. #[deriving(TotalEq, Eq, Clone)] @@ -50,7 +48,7 @@ impl DMat { impl DMat { /// Builds a matrix filled with zeros. - /// + /// /// # Arguments /// * `dim` - The dimension of the matrix. A `dim`-dimensional matrix contains `dim * dim` /// components. @@ -183,7 +181,7 @@ impl DMat { impl Eye for DMat { /// Builds an identity matrix. - /// + /// /// # Arguments /// * `dim` - The dimension of the matrix. A `dim`-dimensional matrix contains `dim * dim` /// components. @@ -377,7 +375,7 @@ Inv for DMat { n0 = n0 + 1; } - if n0 == dim { + if n0 == dim { return false } diff --git a/src/structs/dvec.rs b/src/structs/dvec.rs index 662d3bfe..2781b7f9 100644 --- a/src/structs/dvec.rs +++ b/src/structs/dvec.rs @@ -11,9 +11,6 @@ use std::iter::FromIterator; use traits::geometry::{Dot, Norm}; use traits::structure::{Iterable, IterableMut, Indexable}; -#[doc(hidden)] -mod metal; - /// Vector with a dimension unknown at compile-time. #[deriving(TotalEq, Eq, Show, Clone)] pub struct DVec { @@ -33,7 +30,7 @@ sub_redispatch_impl!(DVec, DVecSubRhs) impl DVec { /// Builds a vector filled with zeros. - /// + /// /// # Arguments /// * `dim` - The dimension of the vector. #[inline] @@ -88,7 +85,7 @@ impl Indexable for DVec { impl DVec { /// Builds a vector filled with ones. - /// + /// /// # Arguments /// * `dim` - The dimension of the vector. #[inline] @@ -291,7 +288,7 @@ impl Dot for DVec { } res - } + } #[inline] fn sub_dot(a: &DVec, b: &DVec, c: &DVec) -> N { @@ -302,7 +299,7 @@ impl Dot for DVec { } res - } + } } impl Norm for DVec { diff --git a/src/structs/iso.rs b/src/structs/iso.rs index de4a78e2..15b8f55e 100644 --- a/src/structs/iso.rs +++ b/src/structs/iso.rs @@ -13,8 +13,6 @@ use traits::geometry::{RotationMatrix, Rotation, Rotate, AbsoluteRotate, Transfo use structs::vec::{Vec1, Vec2, Vec3, Vec4, Vec2MulRhs, Vec3MulRhs, Vec4MulRhs}; use structs::rot::{Rot2, Rot3, Rot4}; -mod metal; -mod iso_macros; /// Two dimensional isometry. /// @@ -68,7 +66,7 @@ impl Iso3 { } /// Reorient and translate this transformation such that its local `z` axis points to a given - /// direction. + /// direction. /// /// # Arguments /// * eye - The new translation of the transformation. diff --git a/src/structs/mat.rs b/src/structs/mat.rs index d0f9ca7d..cbf863af 100644 --- a/src/structs/mat.rs +++ b/src/structs/mat.rs @@ -15,8 +15,6 @@ use traits::structure::{Cast, Row, Col, Iterable, IterableMut, Dim, Indexable, use traits::operations::{Absolute, Transpose, Inv, Outer}; use traits::geometry::{ToHomogeneous, FromHomogeneous}; -mod metal; -mod mat_macros; /// Special identity matrix. All its operation are no-ops. #[deriving(TotalEq, Eq, Decodable, Clone, Rand, Show)] diff --git a/src/structs/mod.rs b/src/structs/mod.rs index f7ebcac4..3d33f068 100644 --- a/src/structs/mod.rs +++ b/src/structs/mod.rs @@ -16,11 +16,16 @@ pub use self::mat::{Mat1MulRhs, Mat2MulRhs, Mat3MulRhs, Mat4MulRhs, Mat5MulRhs, Mat1AddRhs, Mat2AddRhs, Mat3AddRhs, Mat4AddRhs, Mat5AddRhs, Mat6AddRhs, Mat1SubRhs, Mat2SubRhs, Mat3SubRhs, Mat4SubRhs, Mat5SubRhs, Mat6SubRhs}; +mod metal; mod dmat; mod dvec; +mod vec_macros; mod vec; +mod mat_macros; mod mat; +mod rot_macros; mod rot; +mod iso_macros; mod iso; // specialization for some 1d, 2d and 3d operations diff --git a/src/structs/rot.rs b/src/structs/rot.rs index b184dd6d..6e895d0c 100644 --- a/src/structs/rot.rs +++ b/src/structs/rot.rs @@ -11,8 +11,6 @@ use traits::operations::{Absolute, Inv, Transpose, ApproxEq}; use structs::vec::{Vec1, Vec2, Vec3, Vec4, Vec2MulRhs, Vec3MulRhs, Vec4MulRhs}; use structs::mat::{Mat2, Mat3, Mat4, Mat5}; -mod metal; -mod rot_macros; /// Two dimensional rotation matrix. #[deriving(TotalEq, Eq, Encodable, Decodable, Clone, Show, Hash)] @@ -161,7 +159,7 @@ impl Rot3 { xaxis.z , yaxis.z , zaxis.z) } - /// Reorient this matrix such that its local `z` axis points to a given point. + /// Reorient this matrix such that its local `z` axis points to a given point. /// /// # Arguments /// * at - The point to look at. It is also the direction the matrix `y` axis will be aligned @@ -273,7 +271,7 @@ pub struct Rot4 { // pub fn new(left_iso: Quat, right_iso: Quat) -> Rot4 { // assert!(left_iso.is_unit()); // assert!(right_iso.is_unright); -// +// // let mat_left_iso = Mat4::new( // left_iso.x, -left_iso.y, -left_iso.z, -left_iso.w, // left_iso.y, left_iso.x, -left_iso.w, left_iso.z, @@ -284,7 +282,7 @@ pub struct Rot4 { // right_iso.y, right_iso.x, right_iso.w, -right_iso.z, // right_iso.z, -right_iso.w, right_iso.x, right_iso.y, // right_iso.w, right_iso.z, -right_iso.y, right_iso.x); -// +// // Rot4 { // submat: mat_left_iso * mat_right_iso // } diff --git a/src/structs/vec.rs b/src/structs/vec.rs index 486243d1..a8a9ab14 100644 --- a/src/structs/vec.rs +++ b/src/structs/vec.rs @@ -12,8 +12,6 @@ use traits::geometry::{Transform, Rotate, FromHomogeneous, ToHomogeneous, Dot, N Translation, Translate}; use traits::structure::{Basis, Cast, Dim, Indexable, Iterable, IterableMut}; -mod metal; -mod vec_macros; /// Vector of dimension 0. #[deriving(TotalEq, Eq, Decodable, Clone, Rand, Zero, Show)]