SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Math::Random Class Reference

A class for generating random numbers and values. More...

#include <Random.hpp>

Static Public Member Functions

static bool Boolean ()
static Sleak::Math::Color Color (bool AlphaIncluded=false)
static Sleak::Math::Color Color (float min, float max, bool AlphaIncluded=false)
static float NormalDistribution (float mean, float stddev)
static float Range (float min, float max)
static int Range (int min, int max)
static void Seed (unsigned int seed)
static void SeedWithTime ()
static Sleak::Math::Vector3D UnitVector ()
static float Value ()
static Sleak::Math::Vector2D Vector2D ()
static Sleak::Math::Vector2D Vector2D (float min, float max)
static Sleak::Math::Vector3D Vector3D ()
static Sleak::Math::Vector3D Vector3D (float min, float max)

Detailed Description

A class for generating random numbers and values.

This class provides a comprehensive set of functions for generating various types of random numbers and values, including integers, floating-point numbers, vectors, and colors. It uses the Mersenne Twister engine for high-quality random number generation.

Definition at line 21 of file Random.hpp.

Member Function Documentation

◆ Boolean()

bool Sleak::Math::Random::Boolean ( )
inlinestatic

Definition at line 97 of file Random.hpp.

◆ Color() [1/2]

Sleak::Math::Color Sleak::Math::Random::Color ( bool AlphaIncluded = false)
inlinestatic

Definition at line 84 of file Random.hpp.

◆ Color() [2/2]

Sleak::Math::Color Sleak::Math::Random::Color ( float min,
float max,
bool AlphaIncluded = false )
inlinestatic

Definition at line 90 of file Random.hpp.

◆ NormalDistribution()

float Sleak::Math::Random::NormalDistribution ( float mean,
float stddev )
inlinestatic

Definition at line 102 of file Random.hpp.

◆ Range() [1/2]

float Sleak::Math::Random::Range ( float min,
float max )
inlinestatic

Definition at line 47 of file Random.hpp.

◆ Range() [2/2]

int Sleak::Math::Random::Range ( int min,
int max )
inlinestatic

Definition at line 35 of file Random.hpp.

◆ Seed()

void Sleak::Math::Random::Seed ( unsigned int seed)
inlinestatic

Definition at line 24 of file Random.hpp.

◆ SeedWithTime()

void Sleak::Math::Random::SeedWithTime ( )
inlinestatic

Definition at line 29 of file Random.hpp.

◆ UnitVector()

Sleak::Math::Vector3D Sleak::Math::Random::UnitVector ( )
inlinestatic

Definition at line 74 of file Random.hpp.

◆ Value()

float Sleak::Math::Random::Value ( )
inlinestatic

Definition at line 41 of file Random.hpp.

◆ Vector2D() [1/2]

Sleak::Math::Vector2D Sleak::Math::Random::Vector2D ( )
inlinestatic

Definition at line 64 of file Random.hpp.

◆ Vector2D() [2/2]

Sleak::Math::Vector2D Sleak::Math::Random::Vector2D ( float min,
float max )
inlinestatic

Definition at line 69 of file Random.hpp.

◆ Vector3D() [1/2]

Sleak::Math::Vector3D Sleak::Math::Random::Vector3D ( )
inlinestatic

Definition at line 53 of file Random.hpp.

◆ Vector3D() [2/2]

Sleak::Math::Vector3D Sleak::Math::Random::Vector3D ( float min,
float max )
inlinestatic

Definition at line 58 of file Random.hpp.