RandomNumber

Description

sealed class Tinman.Core.Util.RandomNumber

A generator for pseudo random numbers.

Public / Constructors

RandomNumber


public constructor RandomNumber → (1)

seed in : int32

The random number seed value to use.

Creates a new instance of RandomNumber.

Public / Methods

Bool


public method Bool → ()

returns → bool

The random value.

Returns a random boolean value.

Float32

2 overloads


public method Float321 → ()

returns → float32

The random number.

Returns a random 32-bit floating-point number in the range [0..1].


public method Float322 → (2)

minimum in : float32

Lower bound of range.

maximum in : float32

Upper bound of range.

returns → float32

The random number.

Returns a random 32-bit floating-point number in the given range.

Float64

2 overloads


public method Float641 → ()

returns → float64

The random number.

Returns a random 64-bit floating-point number in the range [0..1].


public method Float642 → (2)

minimum in : float64

Lower bound of range.

maximum in : float64

Upper bound of range.

returns → float64

The random number.

Returns a random 64-bit floating-point number in the given range.

Int32

2 overloads


public method Int321 → ()

returns → int32

The random number.

Returns a random 32-bit integer positive number.


public method Int322 → (2)

minimum in : int32

The minimum value, inclusive.

maximum in : int32

The maximum value, inclusive.

returns → int32

The random number.

Returns a random 32-bit integer number in the given range.

Int64

2 overloads


public method Int641 → ()

returns → int64

The random number.

Returns a random 64-bit integer positive number.


public method Int642 → (2)

minimum in : int64

The minimum value, inclusive.

maximum in : int64

The maximum value, inclusive.

returns → int64

The random number.

Returns a random 32-bit integer number in the given range.