From f82cb8002dad225a4ee2283f7a9436dc2bdaa721 Mon Sep 17 00:00:00 2001 From: arturo Date: Fri, 16 Jan 2015 11:46:56 +0100 Subject: [PATCH] impl BaseNum for integers --- src/traits/structure.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/traits/structure.rs b/src/traits/structure.rs index b84e5e2d..467b8b6c 100644 --- a/src/traits/structure.rs +++ b/src/traits/structure.rs @@ -8,7 +8,7 @@ use std::ops::{Add, Sub, Mul, Div, Neg, Rem, Index, IndexMut}; use traits::operations::{RMul, LMul, Axpy, Transpose, Inv, Absolute}; use traits::geometry::{Dot, Norm, Orig}; -/// Basic isizeegral numeric trait. +/// Basic integral numeric trait. pub trait BaseNum: Copy + Zero + One + Add + Sub + Mul + Div + @@ -460,6 +460,16 @@ macro_rules! impl_base_float( } ); +impl BaseNum for i8{} +impl BaseNum for i16{} +impl BaseNum for i32{} +impl BaseNum for i64{} +impl BaseNum for isize{} +impl BaseNum for u8{} +impl BaseNum for u16{} +impl BaseNum for u32{} +impl BaseNum for u64{} +impl BaseNum for usize{} impl BaseNum for f32 { } impl BaseNum for f64 { }