BogaNet 1.4.0
Loading...
Searching...
No Matches
Static Public Member Functions | Properties | List of all members
BogaNet.TrueRandom.FloatTRNG Class Referenceabstract

Generates true random floats in configurable intervals. More...

Inheritance diagram for BogaNet.TrueRandom.FloatTRNG:
BogaNet.TrueRandom.BaseTRNG

Static Public Member Functions

static int CalcBits (int number=1)
 Calculates needed bits (from the quota) for generating random floats. NOTE: The calculated value is an approximation and will may differ from the real quota deducted from the server.
 
static List< float > Generate (float min, float max, int number=1, bool prng=false)
 Generates random floats.
 
static async Task< List< float > > GenerateAsync (float min, float max, int number=1, bool prng=false)
 Generates random floats asynchronously.
 
static List< float > GeneratePRNG (float min, float max, int number=1, int seed=0)
 Generates random floats with the C#-standard Pseudo-Random-Number-Generator.
 

Properties

static List< float > Result = [] [get]
 Returns the list of floats from the last generation.
 
- Properties inherited from BogaNet.TrueRandom.BaseTRNG
static int Seed [get]
 Returns a seed for the PRNG.
 

Additional Inherited Members

- Static Public Attributes inherited from BogaNet.TrueRandom.BaseTRNG
const string GENERATOR_URL = "https://www.random.org/"
 URL of the random number generator.
 
- Static Protected Attributes inherited from BogaNet.TrueRandom.BaseTRNG
static readonly Random _rnd = new()
 
static bool _isRunning
 

Detailed Description

Generates true random floats in configurable intervals.

Member Function Documentation

◆ CalcBits()

static int BogaNet.TrueRandom.FloatTRNG.CalcBits ( int number = 1)
static

Calculates needed bits (from the quota) for generating random floats. NOTE: The calculated value is an approximation and will may differ from the real quota deducted from the server.

Parameters
numberHow many numbers (optional, default: 1)
Returns
Needed bits for generating the floats.

◆ Generate()

static List< float > BogaNet.TrueRandom.FloatTRNG.Generate ( float min,
float max,
int number = 1,
bool prng = false )
static

Generates random floats.

Parameters
minSmallest possible number (range: -1'000'000'000 - 1'000'000'000)
maxBiggest possible number (range: -1'000'000'000 - 1'000'000'000)
numberHow many numbers you want to generate (optional, range: 1 - 10'000, default: 1)
prngUse Pseudo-Random-Number-Generator (optional, default: false)
Returns
List with the generated floats.

◆ GenerateAsync()

static async Task< List< float > > BogaNet.TrueRandom.FloatTRNG.GenerateAsync ( float min,
float max,
int number = 1,
bool prng = false )
static

Generates random floats asynchronously.

Parameters
minSmallest possible number (range: -1'000'000'000 - 1'000'000'000)
maxBiggest possible number (range: -1'000'000'000 - 1'000'000'000)
numberHow many numbers you want to generate (optional, range: 1 - 10'000, default: 1)
prngUse Pseudo-Random-Number-Generator (optional, default: false)
Returns
List with the generated floats.

◆ GeneratePRNG()

static List< float > BogaNet.TrueRandom.FloatTRNG.GeneratePRNG ( float min,
float max,
int number = 1,
int seed = 0 )
static

Generates random floats with the C#-standard Pseudo-Random-Number-Generator.

Parameters
minSmallest possible number
maxBiggest possible number
numberHow many numbers you want to generate (optional, default: 1)
seedSeed for the PRNG (optional, default: 0 (=standard))
Returns
List with the generated floats.

Property Documentation

◆ Result

List<float> BogaNet.TrueRandom.FloatTRNG.Result = []
staticget

Returns the list of floats from the last generation.

Returns
List of floats from the last generation.

The documentation for this class was generated from the following file: