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

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