![]() ![]() ![]()
|
BREW C++ ライブラリ & GUI フレームワーク & XML ミドルウェア : SophiaFramework UNIVERSE 5.0 |
// UINT32_MINIMUM 〜 UINT32_MAXIMUM の間の数 SInt32 n1 = SFXBrewRandom::GetSInt32(); // 乱数を取得する // 0 〜 UINT08_MAXIMUM の間の数 UInt08 n2 = SFXBrewRandom::GetUInt08(); // 乱数を取得する // Float64 で考え得る数 Float64 n3 = SFXBrewRandom::GetFloat64(); // 乱数を取得する // Bool b = static_cast<Bool>(SFXBrewRandom::GetUInt32() % 2); // と書くよりも品質のよい乱数が得られる Bool b = SFXBrewRandom::GetBool(); // Bool 型の乱数を取得する
| パブリック関数 | |
|---|---|
| static Bool |
GetBool( Void ) Bool 型の乱数を生成します。
|
| static Float32 |
GetFloat32( Void ) Float32 型の乱数を生成します。
|
| static Float64 |
GetFloat64( Void ) Float64 型の乱数を生成します。
|
| static SInt08 |
GetSInt08( Void ) SInt08 型の乱数を生成します。
|
| static SInt16 |
GetSInt16( Void ) SInt16 型の乱数を生成します。
|
| static SInt32 |
GetSInt32( Void ) SInt32 型の乱数を生成します。
|
| static UInt08 |
GetUInt08( Void ) UInt08 型の乱数を生成します。
|
| static UInt16 |
GetUInt16( Void ) UInt16 型の乱数を生成します。
|
| static UInt32 |
GetUInt32( Void ) UInt32 型の乱数を生成します。
|
[ public, static ] Bool GetBool(Void);
UInt32 型の乱数を生成し、その乱数の最下位から 25 ビット目を Bool 型に変換して返します。
SFXBrewRandom::GetBool();
[ public, static ] Float32 GetFloat32(Void);
戻り値は 0 以上 1 未満の値をとります。
UInt32 型の乱数を生成し、その乱数を 4294967296 で割った値を Float32 型に変換して返します。
SFXBrewRandom::GetFloat32();
[ public, static ] Float64 GetFloat64(Void);
戻り値は 0 以上 1 未満の値をとります。
UInt32 型の乱数を生成し、その乱数を 4294967296 で割った値を Float64 型に変換して返します。
SFXBrewRandom::GetFloat64();
[ public, static ] SInt08 GetSInt08(Void);
UInt32 型の乱数を生成し、その乱数の最上位から 8 ビットを SInt08 型に変換して返します。
SFXBrewRandom::GetSInt08();
[ public, static ] SInt16 GetSInt16(Void);
UInt32 型の乱数を生成し、その乱数の最上位から 16 ビットを SInt16 型に変換して返します。
SFXBrewRandom::GetSInt16();
[ public, static ] SInt32 GetSInt32(Void);
UInt32 型の乱数を生成し、その乱数の最上位から 32 ビットを SInt32 型に変換して返します。
SFXBrewRandom::GetSInt32();
[ public, static ] UInt08 GetUInt08(Void);
UInt32 型の乱数を生成し、その乱数の最上位から 8 ビットを UInt08 型に変換して返します。
SFXBrewRandom::GetUInt08();
[ public, static ] UInt16 GetUInt16(Void);
UInt32 型の乱数を生成し、その乱数の最上位から 16 ビットを UInt16 型に変換して返します。
SFXBrewRandom::GetUInt16();
[ public, static ] UInt32 GetUInt32(Void);
UInt32 型の乱数を返します。
SFXBrewRandom::GetUInt32();
|
Copyright (C) 2002 - 2008 Sophia Cradle Incorporated All Rights Reserved. |
![]() ![]() ![]()
|