From 2295579eb790d6eff6e54e84c01da6de10809a71 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 22 May 2012 16:57:15 +0000 Subject: Better win_o ignores. The random number system is pretty much together. We need a few extra helper functions to cover some other good things, like normalized floating point numbers, etc. --- src/experimental/randomsystem.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/experimental/randomsystem.h (limited to 'src/experimental/randomsystem.h') diff --git a/src/experimental/randomsystem.h b/src/experimental/randomsystem.h new file mode 100644 index 0000000..7106d58 --- /dev/null +++ b/src/experimental/randomsystem.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2007-2012 Xagasoft, All rights reserved. + * + * This file is part of the libbu++ library and is released under the + * terms of the license contained in the file LICENSE. + */ +#ifndef BU_RANDOM_SYSTEM_H +#define BU_RANDOM_SYSTEM_H + +#include "bu/randombase.h" + +namespace Bu +{ + class File; + class RandomSystem : public RandomBase + { + public: + enum Type + { + Fast, + Good + }; + + RandomSystem( Type eType=Fast ); + virtual ~RandomSystem(); + + virtual void seed( int32_t iSeed ); + + virtual int32_t rand(); + + private: + Type eType; + File *pSrc; + }; +}; + +#endif -- cgit v1.2.3