2013-11-03 14:46:39 +00:00
|
|
|
#ifndef RANDOMGENERATOR_H
|
|
|
|
#define RANDOMGENERATOR_H
|
|
|
|
|
|
|
|
#include "system_global.h"
|
2013-11-19 11:16:33 +00:00
|
|
|
|
2013-11-03 14:46:39 +00:00
|
|
|
#include <cstdlib>
|
|
|
|
|
|
|
|
namespace paysages {
|
|
|
|
namespace system {
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
class SYSTEMSHARED_EXPORT RandomGenerator {
|
|
|
|
public:
|
2013-11-03 14:46:39 +00:00
|
|
|
RandomGenerator();
|
|
|
|
|
2015-11-09 21:30:46 +00:00
|
|
|
static inline double random() {
|
2013-11-03 14:46:39 +00:00
|
|
|
return ((double)rand()) / (double)RAND_MAX;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // RANDOMGENERATOR_H
|