VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
Random.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstddef>
4
5
namespace
VoltMod
6
{
7
8
/**
9
* A uniformly random index in `[0, count)`, or 0 when @p count is 0.
10
*
11
* The framework's single source of randomness, so features that need a random pick (`@random`
12
* targeting, a random menu entry) do not each seed their own generator - or fall back to
13
* something like the tick counter, which repeats within a frame.
14
*
15
* Game-thread only; the generator is not synchronised.
16
*/
17
std::size_t
RandomIndex
(std::size_t
count
);
18
19
}
// namespace VoltMod
VoltMod
Definition
Options.hpp:13
VoltMod::RandomIndex
std::size_t RandomIndex(std::size_t count)
Definition
Random.cpp:7
VoltMod::ReadFile
static std::string ReadFile(const std::filesystem::path &path)
Definition
Loader.cpp:56
include
VoltMod
Core
Random.hpp
Generated by
1.9.8