add for hw4

This commit is contained in:
2025-11-09 17:36:29 +09:00
parent 2cd6c98104
commit 49355f8f54
8 changed files with 1117 additions and 0 deletions

15
hws/hw4/rng.h Normal file
View File

@@ -0,0 +1,15 @@
#pragma once
#include <stdint.h>
typedef struct rng {
int64_t seed;
} rng;
rng *get_rng(int64_t seed);
void free_rng(rng* rng);
float rng_uniform(rng *rng, float a, float b);
float rng_gaussian(rng *rng, float m, float s);