Changeset 80 in tspsg-svn for trunk/src/tspmodel.cpp
- Timestamp:
- Dec 22, 2009, 8:56:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/tspmodel.cpp
r71 r80 31 31 : QAbstractTableModel(parent), nCities(0) 32 32 { 33 settings = new QSettings(QSettings::IniFormat, QSettings::UserScope,"TSPSG","tspsg");33 settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, "TSPSG", "tspsg", this); 34 34 } 35 35 … … 468 468 inline int CTSPModel::rand(int min, int max) const 469 469 { 470 return min + (int) (((float)qrand() / RAND_MAX) * (max- min));471 } 470 return min + (int)floor(((double)qrand() / RAND_MAX) * (max + 1 - min)); 471 }
Note: See TracChangeset
for help on using the changeset viewer.