found one bug in the previous ++ changes

This commit is contained in:
Gael Guennebaud
2008-12-17 16:04:21 +00:00
parent 89f468671d
commit e3a8431a4a
2 changed files with 5 additions and 5 deletions

View File

@@ -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