diff --git a/Cargo.toml b/Cargo.toml index be00d38..49950e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,5 +22,3 @@ name = "cgmath" [dependencies] rustc-serialize="*" -rand_macros="*" -rand="*" diff --git a/src/angle.rs b/src/angle.rs index 9dc3f24..44c8919 100644 --- a/src/angle.rs +++ b/src/angle.rs @@ -24,11 +24,9 @@ use approx::ApproxEq; use num::{BaseFloat, One, one, Zero, zero}; /// An angle, in radians -#[derive_Rand] #[derive(Copy, Clone, PartialEq, PartialOrd, Hash, RustcEncodable, RustcDecodable)] pub struct Rad { pub s: S } /// An angle, in degrees -#[derive_Rand] #[derive(Copy, Clone, PartialEq, PartialOrd, Hash, RustcEncodable, RustcDecodable)] pub struct Deg { pub s: S } diff --git a/src/cgmath.rs b/src/cgmath.rs index f7cc6eb..15a041b 100644 --- a/src/cgmath.rs +++ b/src/cgmath.rs @@ -16,7 +16,6 @@ #![crate_type = "rlib"] #![crate_type = "dylib"] #![feature(old_impl_check, plugin, core, std_misc, custom_derive)] -#![plugin(rand_macros)] //! Computer graphics-centric math. //! @@ -33,7 +32,6 @@ //! These are provided for convenience. extern crate "rustc-serialize" as rustc_serialize; -extern crate rand; // Re-exports diff --git a/src/matrix.rs b/src/matrix.rs index bfbdc50..b79acaa 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -30,17 +30,14 @@ use vector::{Vector, EuclideanVector}; use vector::{Vector2, Vector3, Vector4}; /// A 2 x 2, column major matrix -#[derive_Rand] #[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable)] pub struct Matrix2 { pub x: Vector2, pub y: Vector2 } /// A 3 x 3, column major matrix -#[derive_Rand] #[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable)] pub struct Matrix3 { pub x: Vector3, pub y: Vector3, pub z: Vector3 } /// A 4 x 4, column major matrix -#[derive_Rand] #[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable)] pub struct Matrix4 { pub x: Vector4, pub y: Vector4, pub z: Vector4, pub w: Vector4 } diff --git a/src/quaternion.rs b/src/quaternion.rs index 3267a66..e97755e 100644 --- a/src/quaternion.rs +++ b/src/quaternion.rs @@ -30,7 +30,6 @@ use vector::{Vector3, Vector, EuclideanVector}; /// A [quaternion](https://en.wikipedia.org/wiki/Quaternion) in scalar/vector /// form. -#[derive_Rand] #[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable)] pub struct Quaternion { pub s: S, pub v: Vector3 } diff --git a/src/vector.rs b/src/vector.rs index 83c26fb..675bb08 100644 --- a/src/vector.rs +++ b/src/vector.rs @@ -190,7 +190,6 @@ pub trait Vector: Array1 + Zero + One + Neg { // Utility macro for generating associated functions for the vectors macro_rules! vec( ($Self_:ident <$S:ident> { $($field:ident),+ }, $n:expr, $constructor:ident) => ( - #[derive_Rand] #[derive(PartialEq, Eq, Copy, Clone, Hash, RustcEncodable, RustcDecodable)] pub struct $Self_ { $(pub $field: S),+ }