diff options
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index e54618bf0..42efba341 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -101,7 +101,7 @@ template<> inline float ei_random(float a, float b) int i; do { i = ei_random<int>(256*int(a),256*int(b)); } while(i==0); - return i/256.f; + return float(i)/256.f; #else return a + (b-a) * float(std::rand()) / float(RAND_MAX); #endif |