GUECS: Minimal components from zedcaster that will let me make a GUI for a game.

This commit is contained in:
Zed A. Shaw 2025-04-21 23:45:04 -04:00
parent 10ecf50bc0
commit 1be770d62d
28 changed files with 2528 additions and 30 deletions

28
rand.hpp Normal file
View file

@ -0,0 +1,28 @@
#pragma once
#include <random>
namespace Random {
extern std::mt19937 GENERATOR;
template<typename T>
T uniform(T from, T to) {
std::uniform_int_distribution<T> rand(from, to);
return rand(GENERATOR);
}
template<typename T>
T uniform_real(T from, T to) {
std::uniform_real_distribution<T> rand(from, to);
return rand(GENERATOR);
}
template<typename T>
T normal(T mean, T stddev) {
std::normal_distribution<T> rand(mean, stddev);
return rand(GENERATOR);
}
}