From e453bfed47c3a419508fdd13e2aa0aaaf773da17 Mon Sep 17 00:00:00 2001 From: Eduard Bopp Date: Sat, 4 Apr 2015 17:53:25 +0200 Subject: [PATCH] Use Float trait from num crate --- Cargo.toml | 1 + src/lib.rs | 1 + src/traits/structure.rs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index d3f632e2..2a3dbad9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ arbitrary = ["quickcheck"] [dependencies] rustc-serialize = "*" rand = "*" +num = "*" [dependencies.quickcheck] optional = true diff --git a/src/lib.rs b/src/lib.rs index 9436c358..4da65e06 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -87,6 +87,7 @@ Feel free to add your project to this list if you happen to use **nalgebra**! extern crate rustc_serialize; extern crate rand; +extern crate num; #[cfg(feature="arbitrary")] extern crate quickcheck; diff --git a/src/traits/structure.rs b/src/traits/structure.rs index 57630bc4..bb48630b 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -1,9 +1,9 @@ //! Traits giving structural informations on linear algebra objects or the space they live in. use std::{f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, isize, usize}; -use std::num::Float; use std::slice::{Iter, IterMut}; use std::ops::{Add, Sub, Mul, Div, Rem, Index, IndexMut}; +use num::Float; use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute}; use traits::geometry::{Dot, Norm, Orig};