parent
73b8a6b675
commit
86c13ca14f
12 changed files with 19 additions and 19 deletions
|
@ -30,7 +30,7 @@ name = "cgmath"
|
||||||
unstable = []
|
unstable = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
num = "0.1"
|
num-traits = "0.1"
|
||||||
rand = "0.3"
|
rand = "0.3"
|
||||||
rustc-serialize = "0.3"
|
rustc-serialize = "0.3"
|
||||||
|
|
||||||
|
|
|
@ -21,8 +21,8 @@ use std::ops::*;
|
||||||
|
|
||||||
use rand::{Rand, Rng};
|
use rand::{Rand, Rng};
|
||||||
use rand::distributions::range::SampleRange;
|
use rand::distributions::range::SampleRange;
|
||||||
use rust_num::{Float, Zero};
|
use num_traits::{Float, Zero};
|
||||||
use rust_num::traits::cast;
|
use num_traits::cast;
|
||||||
|
|
||||||
use structure::Angle;
|
use structure::Angle;
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use rust_num::{Float, NumCast};
|
use num_traits::{Float, NumCast};
|
||||||
use rust_num::traits::cast;
|
use num_traits::cast;
|
||||||
|
|
||||||
pub trait ApproxEq: Sized {
|
pub trait ApproxEq: Sized {
|
||||||
type Epsilon: NumCast + Float;
|
type Epsilon: NumCast + Float;
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
//! use cgmath::prelude::*;
|
//! use cgmath::prelude::*;
|
||||||
//! ```
|
//! ```
|
||||||
|
|
||||||
extern crate num as rust_num;
|
extern crate num_traits;
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ pub use transform::*;
|
||||||
|
|
||||||
pub use projection::*;
|
pub use projection::*;
|
||||||
|
|
||||||
pub use rust_num::{One, Zero, one, zero};
|
pub use num_traits::{One, Zero};
|
||||||
|
|
||||||
// Modules
|
// Modules
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use rand::{Rand, Rng};
|
use rand::{Rand, Rng};
|
||||||
use rust_num::{Zero, One};
|
use num_traits::{Zero, One};
|
||||||
use rust_num::traits::cast;
|
use num_traits::cast;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ops::*;
|
use std::ops::*;
|
||||||
|
|
|
@ -19,7 +19,7 @@ use std::cmp;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::ops::*;
|
use std::ops::*;
|
||||||
|
|
||||||
use rust_num::{Float, Num, NumCast};
|
use num_traits::{Float, Num, NumCast};
|
||||||
|
|
||||||
/// A trait providing a [partial ordering](http://mathworld.wolfram.com/PartialOrder.html).
|
/// A trait providing a [partial ordering](http://mathworld.wolfram.com/PartialOrder.html).
|
||||||
pub trait PartialOrd {
|
pub trait PartialOrd {
|
||||||
|
|
|
@ -21,7 +21,7 @@ use std::fmt;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ops::*;
|
use std::ops::*;
|
||||||
|
|
||||||
use rust_num::{One, Zero};
|
use num_traits::{One, Zero};
|
||||||
|
|
||||||
use structure::*;
|
use structure::*;
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,8 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use rust_num::{Zero, One};
|
use num_traits::{Zero, One};
|
||||||
use rust_num::traits::cast;
|
use num_traits::cast;
|
||||||
|
|
||||||
use structure::Angle;
|
use structure::Angle;
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ use std::mem;
|
||||||
use std::ops::*;
|
use std::ops::*;
|
||||||
|
|
||||||
use rand::{Rand, Rng};
|
use rand::{Rand, Rng};
|
||||||
use rust_num::{Float, One, Zero};
|
use num_traits::{Float, One, Zero};
|
||||||
use rust_num::traits::cast;
|
use num_traits::cast;
|
||||||
|
|
||||||
use structure::*;
|
use structure::*;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
//! Generic algebraic structures
|
//! Generic algebraic structures
|
||||||
|
|
||||||
use rust_num::{cast, Float, One, Zero};
|
use num_traits::{cast, Float, One, Zero};
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::ops::*;
|
use std::ops::*;
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ pub trait InnerSpace: VectorSpace + Sized where
|
||||||
/// The distance from the tail to the tip of the vector.
|
/// The distance from the tail to the tip of the vector.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn magnitude(self) -> Self::Scalar {
|
fn magnitude(self) -> Self::Scalar {
|
||||||
use rust_num::Float;
|
use num_traits::Float;
|
||||||
|
|
||||||
// FIXME: Not sure why we can't use method syntax for `sqrt` here...
|
// FIXME: Not sure why we can't use method syntax for `sqrt` here...
|
||||||
Float::sqrt(self.magnitude2())
|
Float::sqrt(self.magnitude2())
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use rust_num::{Zero, One};
|
use num_traits::{Zero, One};
|
||||||
|
|
||||||
use structure::*;
|
use structure::*;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use rand::{Rand, Rng};
|
use rand::{Rand, Rng};
|
||||||
use rust_num::{NumCast, Zero, One};
|
use num_traits::{NumCast, Zero, One};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ops::*;
|
use std::ops::*;
|
||||||
|
|
Loading…
Reference in a new issue