1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __I_RANDOMIZER_H_INCLUDED__
\r
6 #define __I_RANDOMIZER_H_INCLUDED__
\r
8 #include "IReferenceCounted.h"
\r
13 //! Interface for generating random numbers
\r
14 class IRandomizer : public virtual IReferenceCounted
\r
17 //! resets the randomizer
\r
18 /** \param value Initialization value (seed) */
\r
19 virtual void reset(s32 value=0x0f0f0f0f) =0;
\r
21 //! generates a pseudo random number in the range 0..randMax()
\r
22 virtual s32 rand() const =0;
\r
24 //! generates a pseudo random number in the range 0..1
\r
25 virtual f32 frand() const =0;
\r
27 //! get maxmimum number generated by rand()
\r
28 virtual s32 randMax() const =0;
\r
31 } // end namespace irr
\r