src/types.rs

branch
dev
changeset 32
e3cfc4917ee7
parent 13
465fa2121ccb
child 59
9226980e45a7
child 81
d2acaaddd9af
equal deleted inserted replaced
31:50a77e4efcbb 32:e3cfc4917ee7
82 const E : Self; 82 const E : Self;
83 const EPSILON : Self; 83 const EPSILON : Self;
84 const SQRT_2 : Self; 84 const SQRT_2 : Self;
85 const INFINITY : Self; 85 const INFINITY : Self;
86 const NEG_INFINITY : Self; 86 const NEG_INFINITY : Self;
87 const NAN : Self;
87 const FRAC_2_SQRT_PI : Self; 88 const FRAC_2_SQRT_PI : Self;
88 } 89 }
89 90
90 /// Trait for integers 91 /// Trait for integers
91 pub trait Integer : Num + num::Integer {} 92 pub trait Integer : Num + num::Integer {}
131 const E : Self = std::f64::consts::E; 132 const E : Self = std::f64::consts::E;
132 const EPSILON : Self = std::f64::EPSILON; 133 const EPSILON : Self = std::f64::EPSILON;
133 const SQRT_2 : Self = std::f64::consts::SQRT_2; 134 const SQRT_2 : Self = std::f64::consts::SQRT_2;
134 const INFINITY : Self = std::f64::INFINITY; 135 const INFINITY : Self = std::f64::INFINITY;
135 const NEG_INFINITY : Self = std::f64::NEG_INFINITY; 136 const NEG_INFINITY : Self = std::f64::NEG_INFINITY;
137 const NAN : Self = std::f64::NAN;
136 const FRAC_2_SQRT_PI : Self = std::f64::consts::FRAC_2_SQRT_PI; 138 const FRAC_2_SQRT_PI : Self = std::f64::consts::FRAC_2_SQRT_PI;
137 } 139 }
138 140
139 impl Float for f32 { 141 impl Float for f32 {
140 /* 142 /*
148 const E : Self = std::f32::consts::E; 150 const E : Self = std::f32::consts::E;
149 const EPSILON : Self = std::f32::EPSILON; 151 const EPSILON : Self = std::f32::EPSILON;
150 const SQRT_2 : Self = std::f32::consts::SQRT_2; 152 const SQRT_2 : Self = std::f32::consts::SQRT_2;
151 const INFINITY : Self = std::f32::INFINITY; 153 const INFINITY : Self = std::f32::INFINITY;
152 const NEG_INFINITY : Self = std::f32::NEG_INFINITY; 154 const NEG_INFINITY : Self = std::f32::NEG_INFINITY;
155 const NAN : Self = std::f32::NAN;
153 const FRAC_2_SQRT_PI : Self = std::f32::consts::FRAC_2_SQRT_PI; 156 const FRAC_2_SQRT_PI : Self = std::f32::consts::FRAC_2_SQRT_PI;
154 } 157 }
155 158
156 /* 159 /*
157 trait_set! { 160 trait_set! {

mercurial