mirror of
https://github.com/unknownworlds/NS.git
synced 2024-11-15 09:11:55 +00:00
8552ac617c
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@1 67975925-1194-0748-b3d5-c16f83f1a3a1
18 lines
302 B
C++
18 lines
302 B
C++
#ifndef _rand_h
|
|
#define _rand_h
|
|
#include <cstdlib>
|
|
|
|
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
|
using namespace std;
|
|
#endif
|
|
|
|
class MyRandomGenerator
|
|
{
|
|
public:
|
|
unsigned long operator()(unsigned long n_)
|
|
{
|
|
return rand() % n_;
|
|
}
|
|
};
|
|
|
|
#endif // _rand_h
|