Random
乱数を扱うクラス
Constructor Summary
Public Constructor | ||
public |
constructor(seed: number) 初期化 |
Member Summary
Private Members | ||
private |
Is keep random numbers based on Gaussian distribution. |
|
private |
Next random number based on Gaussian distribution. |
Method Summary
Public Methods | ||
public |
指定したビット長以下で表せられる乱数生成 |
|
public |
bool値の乱数 |
|
public |
8ビット長整数の乱数の配列 |
|
public |
nextDouble(): number double精度の実数 |
|
public |
float精度の実数 |
|
public |
ガウシアン分布に従う乱数 |
|
public |
32ビット長整数の乱数 |
|
public |
64ビット長整数の乱数 |
|
public |
16ビット長整数の乱数 |
|
public |
シード値の初期化 |
Private Methods | ||
private |
32-bit random number. |
Public Constructors
Private Members
Public Methods
public next(bits: number): number source
指定したビット長以下で表せられる乱数生成
Params:
Name | Type | Attribute | Description |
bits | number | Required number of bits (up to 64 possible). |
public nextBytes(size: number): Array<number> source
8ビット長整数の乱数の配列
Params:
Name | Type | Attribute | Description |
size | number | 必要な長さ |
public nextInt(x: number): number source
32ビット長整数の乱数
Params:
Name | Type | Attribute | Description |
x | number |
|
指定した値未満の数値を作る |