- attempt to see if this makes stability better

This commit is contained in:
Mark Vejvoda
2013-10-02 20:22:10 +00:00
parent ee6eadb0d8
commit dc503d6340
33 changed files with 692 additions and 712 deletions

View File

@@ -519,7 +519,7 @@ void Properties::setBool(const string &key, bool value){
}
void Properties::setFloat(const string &key, float value){
setString(key, floatToStr(value,10));
setString(key, floatToStr(value,6));
}
void Properties::setString(const string &key, const string &value){

View File

@@ -81,7 +81,7 @@ int RandomGen::randRange(int min, int max,string lastCaller) {
int diff= max-min;
double numerator = static_cast<double>(diff + 1) * static_cast<double>(RandomGen::rand(lastCaller));
int res= min + static_cast<int>(truncateDecimal<double>(numerator / static_cast<double>(m),10));
int res= min + static_cast<int>(truncateDecimal<double>(numerator / static_cast<double>(m),6));
if(res < min || res > max) {
char szBuf[8096]="";
snprintf(szBuf,8096,"In [%s::%s Line: %d] res < min || res > max, min = %d, max = %d, res = %d",__FILE__,__FUNCTION__,__LINE__,min,max,res);
@@ -102,7 +102,7 @@ double RandomGen::randRange(double min, double max,string lastCaller) {
double rand01 = static_cast<double>(RandomGen::rand(lastCaller)) / (m-1);
double res= min + (max - min) * rand01;
res = truncateDecimal<double>(res,10);
res = truncateDecimal<double>(res,6);
if(res < min || res > max) {
char szBuf[8096]="";