Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
pcg_rand.h
1
// SPDX-FileCopyrightText: © 2021, 2024-2025 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include <cstdint>
7
11
class
PCGRand
12
{
13
public
:
14
PCGRand ();
15
16
/* unsigned float [0..1] */
17
float
uf ();
18
19
/* signed float [-1..+1] */
20
float
sf ();
21
22
uint32_t u32 ();
23
24
private
:
25
uint64_t _state = 0;
26
uint64_t _inc = 0;
27
};
src
utils
pcg_rand.h
Generated by
1.15.0