vengine
0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
Random.hpp
Go to the documentation of this file.
1
///
2
/// @file Random.hpp
3
/// @brief Class for random number generation
4
/// @namespace myLib
5
///
6
7
#pragma once
8
9
#include <random>
10
11
namespace
myLib
{
12
13
///
14
/// @class Random
15
/// @brief Class for random number generation
16
///
17
class
Random
{
18
19
public
:
20
21
///
22
/// @brief Generate a random integer between min and max
23
/// @param min The minimum value
24
/// @param max The maximum value
25
/// @return int The random integer
26
///
27
static
int
randomInt
(
int
min,
int
max);
28
static
int
randomInt
() {
return
randomInt
(-1000, 1000); };
29
30
///
31
/// @param min The minimum value
32
/// @param max The maximum value
33
/// @return float The random float
34
///
35
static
float
randomFloat
(
float
min,
float
max);
36
static
float
randomFloat
() {
return
randomFloat
(-1.0f, 1.0f); };
37
38
};
// class Random
39
40
}
// namespace myLib
myLib::Random
Class for random number generation.
Definition
Random.hpp:17
myLib::Random::randomFloat
static float randomFloat()
Definition
Random.hpp:36
myLib::Random::randomInt
static int randomInt()
Definition
Random.hpp:28
myLib
lib
local
static
myLib
include
myLib
Random.hpp
Generated by
1.11.0