![]() ![]() ![]()
|
BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1 |
// number between UINT32_MINIMUM and UINT32_MAXIMUM SInt32 n1 = SFXBrewRandom::GetSInt32(); // get a random number // number between 0 and UINT08_MAXIMUM UInt08 n2 = SFXBrewRandom::GetUInt08(); // get a random number // number can be conceivable as Float64 Float64 n3 = SFXBrewRandom::GetFloat64(); // get a random number // Bool b = static_cast<Bool>(SFXBrewRandom::GetUInt32() % 2); // write the code below instead of the above code to get a better random number of Bool type Bool b = SFXBrewRandom::GetBool(); // get a random number of Bool type
| Public Functions | |
|---|---|
| static Bool |
GetBool( Void ) Generate a random number of Bool type.
|
| static Float32 |
GetFloat32( Void ) Generate a random number of Float32 type.
|
| static Float64 |
GetFloat64( Void ) Generate a random number of Float64 type.
|
| static SInt08 |
GetSInt08( Void ) Generate a random number of SInt08 type.
|
| static SInt16 |
GetSInt16( Void ) Generate a random number of SInt16 type.
|
| static SInt32 |
GetSInt32( Void ) Generate a random number of SInt32 type.
|
| static UInt08 |
GetUInt08( Void ) Generate a random number of UInt08 type.
|
| static UInt16 |
GetUInt16( Void ) Generate a random number of UInt16 type.
|
| static UInt32 |
GetUInt32( Void ) Generate a random number of UInt32 type.
|
[ public, static ] Bool GetBool(Void);
Return the Bool-casted value of the 25th-from-lowest bit of a random number of UInt32 type.
SFXBrewRandom::GetBool();
[ public, static ] Float32 GetFloat32(Void);
The return value takes the value from 0 to less than 1.
Return the Float32-casted value of a random number of UInt32 type divided by 4294967296.
SFXBrewRandom::GetFloat32();
[ public, static ] Float64 GetFloat64(Void);
The return value takes the value from 0 to less than 1.
Return the Float64-casted value of a random number of UInt32 type divided by 4294967296.
SFXBrewRandom::GetFloat64();
[ public, static ] SInt08 GetSInt08(Void);
Return the SInt08-casted value of the highest 8 bits of a random number of UInt32 type.
SFXBrewRandom::GetSInt08();
[ public, static ] SInt16 GetSInt16(Void);
Return the SInt16-casted value of the highest 16 bits of a random number of UInt32 type.
SFXBrewRandom::GetSInt16();
[ public, static ] SInt32 GetSInt32(Void);
Return the SInt32-casted value of a random number of UInt32 type.
SFXBrewRandom::GetSInt32();
[ public, static ] UInt08 GetUInt08(Void);
Return the UInt08-casted value of the highest 8 bits of a random number of UInt32 type.
SFXBrewRandom::GetUInt08();
[ public, static ] UInt16 GetUInt16(Void);
Return the UInt16-casted value of the highest 16 bits of a random number of UInt32 type.
SFXBrewRandom::GetUInt16();
[ public, static ] UInt32 GetUInt32(Void);
Return a random number of UInt32 type.
SFXBrewRandom::GetUInt32();
|
Copyright (C) 2002 - 2009 Sophia Cradle, Inc. All Rights Reserved. |
![]() ![]() ![]()
|