Merge branch 'feature/switch_to_num' into feature/norm_assoc_type
This commit is contained in:
commit
562c0909cc
|
@ -22,6 +22,7 @@ arbitrary = ["quickcheck"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustc-serialize = "*"
|
rustc-serialize = "*"
|
||||||
rand = "*"
|
rand = "*"
|
||||||
|
num = "*"
|
||||||
|
|
||||||
[dependencies.quickcheck]
|
[dependencies.quickcheck]
|
||||||
optional = true
|
optional = true
|
||||||
|
|
|
@ -85,6 +85,7 @@ Feel free to add your project to this list if you happen to use **nalgebra**!
|
||||||
#![cfg_attr(test, feature(test))]
|
#![cfg_attr(test, feature(test))]
|
||||||
#![doc(html_root_url = "http://nalgebra.org/doc")]
|
#![doc(html_root_url = "http://nalgebra.org/doc")]
|
||||||
|
|
||||||
|
extern crate num;
|
||||||
extern crate rustc_serialize;
|
extern crate rustc_serialize;
|
||||||
extern crate rand;
|
extern crate rand;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
//! Traits giving structural informations on linear algebra objects or the space they live in.
|
//! Traits giving structural informations on linear algebra objects or the space they live in.
|
||||||
|
|
||||||
|
use num::Float;
|
||||||
use std::{f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, isize, usize};
|
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::slice::{Iter, IterMut};
|
||||||
use std::ops::{Add, Sub, Mul, Div, Rem, Index, IndexMut};
|
use std::ops::{Add, Sub, Mul, Div, Rem, Index, IndexMut};
|
||||||
use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute};
|
use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute};
|
||||||
|
@ -16,7 +16,8 @@ pub trait BaseNum: Copy + Zero + One +
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Basic floating-point number numeric trait.
|
/// Basic floating-point number numeric trait.
|
||||||
pub trait BaseFloat: Float + Cast<f64> + BaseNum {
|
/// (Note: Clone could be a constraint on BaseNum instead)
|
||||||
|
pub trait BaseFloat: Float + Clone + Cast<f64> + BaseNum {
|
||||||
/// Archimedes' constant.
|
/// Archimedes' constant.
|
||||||
fn pi() -> Self;
|
fn pi() -> Self;
|
||||||
/// 2.0 * pi.
|
/// 2.0 * pi.
|
||||||
|
|
Loading…
Reference in New Issue