Add neg trait to BaseFloat
This commit is contained in:
parent
350c8fb927
commit
f0ce528903
|
@ -2,7 +2,7 @@
|
|||
|
||||
use std::{f32, f64, i8, i16, i32, i64, u8, u16, u32, u64, isize, usize};
|
||||
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, Neg};
|
||||
use num::{Float, Zero, One};
|
||||
use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute};
|
||||
use traits::geometry::{Dot, Norm, Orig};
|
||||
|
@ -16,7 +16,7 @@ pub trait BaseNum: Copy + Zero + One +
|
|||
}
|
||||
|
||||
/// Basic floating-point number numeric trait.
|
||||
pub trait BaseFloat: Float + Cast<f64> + BaseNum {
|
||||
pub trait BaseFloat: Float + Cast<f64> + BaseNum + Neg {
|
||||
/// Archimedes' constant.
|
||||
fn pi() -> Self;
|
||||
/// 2.0 * pi.
|
||||
|
|
Loading…
Reference in New Issue