CrossFramework Library
|
00001 00006 #if defined(XBASE_INCLUDED_RANDOM_HPP) 00007 #else 00008 #define XBASE_INCLUDED_RANDOM_HPP 00009 00010 //------------------------------------------------------------ 00011 #include <XBase/BuiltInTypes.hpp> 00012 00013 //------------------------------------------------------------ 00014 namespace XBase { 00016 00017 00022 class Random 00023 { 00024 public: 00026 00027 Random(); 00028 Random( u32 x , u32 y , u32 z , u32 w ); 00029 00030 00032 00033 u32 rand(); 00034 u32 randU32( u32 aTerm ); 00035 s32 randS32( s32 aTerm ); 00036 s32 randS32( s32 aMin , s32 aMax ); 00037 f32 randF32N(); 00038 f32 randF32SN(); 00039 unsigned int operator()( unsigned int aTerm ); 00040 00041 00042 private: 00043 u32 mX; 00044 u32 mY; 00045 u32 mZ; 00046 u32 mW; 00047 }; 00049 } 00050 //------------------------------------------------------------ 00051 #endif 00052 // EOF