mirror of
https://github.com/unknownworlds/NS.git
synced 2024-12-02 17:21:56 +00:00
2f9f0c732e
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@277 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
|