Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
fast_random.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015 Roc Streaming authors
3
*
4
* This Source Code Form is subject to the terms of the Mozilla Public
5
* License, v. 2.0. If a copy of the MPL was not distributed with this
6
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7
*/
8
9
//! @file roc_core/target_posix/roc_core/fast_random.h
10
//! @brief Helpers to work with random numbers.
11
12
#ifndef ROC_CORE_FAST_RANDOM_H_
13
#define ROC_CORE_FAST_RANDOM_H_
14
15
#include "
roc_core/stddefs.h
"
16
17
namespace
roc
{
18
namespace
core {
19
20
//! Get a random integer from a non cryptographically secure, but fast PRNG.
21
//! Thread-safe.
22
//! @returns random value in range [from; to].
23
uint32_t
fast_random
(uint32_t from, uint32_t to);
24
25
}
// namespace core
26
}
// namespace roc
27
28
#endif
// ROC_CORE_FAST_RANDOM_H_
roc::core::fast_random
uint32_t fast_random(uint32_t from, uint32_t to)
Get a random integer from a non cryptographically secure, but fast PRNG. Thread-safe.
roc
Root namespace.
stddefs.h
Commonly used types and functions.
roc_core
target_posix
roc_core
fast_random.h
Generated by
1.9.6