#include <DungeonRandom.h>
Random numbers for dungeon generation ダンジョン生成用乱数
◆ CDungeonRandom()
CDungeonRandom::CDungeonRandom |
( |
const std::shared_ptr< dungeon::Random > & |
random | ) |
|
|
explicit |
- Author
- Shun Moriya
- Copyright
- 2023- Shun Moriya All Rights Reserved.
◆ GetBoolean()
bool CDungeonRandom::GetBoolean |
( |
| ) |
const |
◆ GetInteger() [1/3]
CDungeonRandom::IntegerType CDungeonRandom::GetInteger |
( |
| ) |
const |
Get a random number
- Returns
- Returns the range [type_min,type_max) if T is an integer, or [0,1] with equal probability if T is a real number.
◆ GetInteger() [2/3]
CDungeonRandom::IntegerType CDungeonRandom::GetInteger |
( |
const IntegerType |
from, |
|
|
const IntegerType |
to |
|
) |
| const |
Get a random number
- Parameters
-
[in] | from | Lower value |
[in] | to | Upper value |
- Returns
- Returns the range [from,to) if T is an integer, or [from,to] with equal probability if T is a real number.
◆ GetInteger() [3/3]
CDungeonRandom::IntegerType CDungeonRandom::GetInteger |
( |
const IntegerType |
to | ) |
const |
Get a random number
- Parameters
-
- Returns
- Returns the range [0,to) if T is an integer, or [0,to] with equal probability if T is a real number.
◆ GetIntegerSign()
CDungeonRandom::IntegerType CDungeonRandom::GetIntegerSign |
( |
| ) |
const |
◆ GetNumber() [1/3]
CDungeonRandom::NumberType CDungeonRandom::GetNumber |
( |
| ) |
const |
Get a random number
- Returns
- Returns the range [type_min,type_max) if T is an integer, or [0,1] with equal probability if T is a real number.
◆ GetNumber() [2/3]
CDungeonRandom::NumberType CDungeonRandom::GetNumber |
( |
const NumberType |
from, |
|
|
const NumberType |
to |
|
) |
| const |
Get a random number
- Parameters
-
[in] | from | Lower value |
[in] | to | Upper value |
- Returns
- Returns the range [from,to) if T is an integer, or [from,to] with equal probability if T is a real number.
◆ GetNumber() [3/3]
CDungeonRandom::NumberType CDungeonRandom::GetNumber |
( |
const NumberType |
to | ) |
const |
Get a random number
- Parameters
-
- Returns
- Returns the range [0,to) if T is an integer, or [0,to] with equal probability if T is a real number.
◆ GetNumberSign()
CDungeonRandom::NumberType CDungeonRandom::GetNumberSign |
( |
| ) |
const |
The documentation for this class was generated from the following files:
- DungeonRandom.h
- DungeonRandom.cpp