add for hw4
This commit is contained in:
15
hws/hw4/rng.h
Normal file
15
hws/hw4/rng.h
Normal 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);
|
||||
|
||||
Reference in New Issue
Block a user