Project 2 for MA132
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
786 B

#include <stdint.h>
int lfsr_iterate(int32_t prev);
int32_t lfsr_nextnum(int32_t prev);
int32_t prn;
int32_t prng();
double prngd(); // Random double between 0 and 1
double prngdn(); // Normal random number generator - mean 0 stdev 1
double remap(double x, double lowin, double highin, double lowout, double highout); // Linear transform from one range onto another
double uremap(double x, double lowout, double highout); // Linear transform from [0, 1] onto another range
double mremap(double x, double meanin, double stdevin, double meanout, double stdevout); // Linear transform from one mean and stdev to another
double umremap(double x, double mean, double stdev); // Linear tranform from mean 0 stdev 1 to some other mean and stdev
int bound_int(int x, int low, int high);