16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-09-01 13:59:19 +02:00

Poprawki post-merge. Nowy silnik liczb losowych.

Dodane zagubione pliki
This commit is contained in:
firleju
2017-01-25 16:25:25 +01:00
parent 28e85e8dc3
commit 4ad5ac1b51
9 changed files with 21 additions and 15 deletions

View File

@@ -68,16 +68,11 @@ inline long Round(float f)
//return lround(f);
}
inline int Random()
{
std::srand(std::time(NULL));
return std::rand();
}
extern double Random(double a, double b);
inline double Random(double a, double b)
inline double Random()
{
std::srand(std::time(NULL));
return a + std::rand() / (float)RAND_MAX * (b - a);
return Random(0.0,1.0);
}
inline double Random(double b)