From f0ce528903c8d5bfdcffb68f2c358054b77cf5cc Mon Sep 17 00:00:00 2001 From: Tinco Andringa Date: Fri, 8 May 2015 21:03:13 +0200 Subject: [PATCH] Add neg trait to BaseFloat --- src/traits/structure.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/traits/structure.rs b/src/traits/structure.rs index d1bb1c3f..c3b69740 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -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 + BaseNum { +pub trait BaseFloat: Float + Cast + BaseNum + Neg { /// Archimedes' constant. fn pi() -> Self; /// 2.0 * pi.