mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-29 17:39:01 +02:00
[common] unify std::random_device
Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
parent
e9f4541069
commit
27d20814b9
11 changed files with 58 additions and 37 deletions
13
src/common/random.h
Normal file
13
src/common/random.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <random>
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace Common::Random {
|
||||
[[nodiscard]] u32 Random32(u32 seed) noexcept;
|
||||
[[nodiscard]] u64 Random64(u64 seed) noexcept;
|
||||
[[nodiscard]] std::mt19937 GetMT19937() noexcept;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue