diff --git a/src/lmath.rs b/src/lmath.rs index c44e0c9..6667d36 100644 --- a/src/lmath.rs +++ b/src/lmath.rs @@ -23,15 +23,10 @@ #[license = "ASL2"]; #[crate_type = "lib"]; +pub mod dim; + pub mod mat; pub mod quat; pub mod vec; pub mod projection; - -pub trait Dimensional { - pub fn index<'a>(&'a self, i: uint) -> &'a T; - pub fn index_mut<'a>(&'a mut self, i: uint) -> &'a mut T; - pub fn as_slice<'a>(&'a self) -> &'a Slice; - pub fn as_mut_slice<'a>(&'a mut self) -> &'a mut Slice; -} diff --git a/src/mat.rs b/src/mat.rs index 4318755..2ebbfdb 100644 --- a/src/mat.rs +++ b/src/mat.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; +pub use dim::Dimensional; pub use self::mat2::{Mat2, ToMat2}; pub use self::mat3::{Mat3, ToMat3}; pub use self::mat4::{Mat4, ToMat4}; diff --git a/src/mat2.rs b/src/mat2.rs index 1533570..3c8839b 100644 --- a/src/mat2.rs +++ b/src/mat2.rs @@ -13,8 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; - +use dim::Dimensional; use mat::{Mat3, ToMat3}; use mat::{Mat4, ToMat4}; use vec::Vec2; diff --git a/src/mat3.rs b/src/mat3.rs index afd3eb8..67bdd50 100644 --- a/src/mat3.rs +++ b/src/mat3.rs @@ -13,8 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; - +use dim::Dimensional; use mat::{Mat4, ToMat4}; use quat::{Quat, ToQuat}; use vec::Vec3; diff --git a/src/mat4.rs b/src/mat4.rs index 8fa21a1..8b9e66a 100644 --- a/src/mat4.rs +++ b/src/mat4.rs @@ -13,8 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; - +use dim::Dimensional; use mat::Mat3; use vec::Vec4; diff --git a/src/quat.rs b/src/quat.rs index 83d16ab..325863c 100644 --- a/src/quat.rs +++ b/src/quat.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; +pub use dim::Dimensional; use mat::{Mat3, ToMat3}; use vec::Vec3; diff --git a/src/vec.rs b/src/vec.rs index 46fc9c2..54f026c 100644 --- a/src/vec.rs +++ b/src/vec.rs @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; +pub use dim::Dimensional; pub use self::vec2::Vec2; pub use self::vec3::Vec3; pub use self::vec4::Vec4; diff --git a/src/vec2.rs b/src/vec2.rs index 808780a..bb04f07 100644 --- a/src/vec2.rs +++ b/src/vec2.rs @@ -13,8 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; - +use dim::Dimensional; mod macros; mod dim_macros; mod vec_macros; diff --git a/src/vec3.rs b/src/vec3.rs index 25c0c96..dee5795 100644 --- a/src/vec3.rs +++ b/src/vec3.rs @@ -13,8 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; - +use dim::Dimensional; mod macros; mod dim_macros; mod vec_macros; diff --git a/src/vec4.rs b/src/vec4.rs index 56737a4..a1af0bf 100644 --- a/src/vec4.rs +++ b/src/vec4.rs @@ -13,8 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pub use super::Dimensional; - +use dim::Dimensional; mod macros; mod dim_macros; mod vec_macros;