about summary refs log tree commit diff stats
path: root/064random.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-05-23 14:58:14 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-05-23 15:00:03 -0700
commitca1afb29c64ae81b74e13c3f613be7d3603c2d76 (patch)
tree5f0accc682f7c7ad9edc0a357f7a8c3ddf5ef3b5 /064random.cc
parentc1041a26ad35c22578bee34d368568d6f6c5dac7 (diff)
downloadmu-ca1afb29c64ae81b74e13c3f613be7d3603c2d76.tar.gz
1441 - give up on unit tests for 'random'
I'd been hoping that I could simply pass in the previously-returned
number to srand() to generate the next one in the series. But looks like
rand() is more stateful than that.

Another weirdness: I put in 'round' in the same layer because of the
vague idea that it would help generate random integers. But that's all
we get anyway.
Diffstat (limited to '064random.cc')
-rw-r--r--064random.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/064random.cc b/064random.cc
index 98ec3156..0180dfae 100644
--- a/064random.cc
+++ b/064random.cc
@@ -4,8 +4,9 @@ RANDOM,
 Recipe_number["random"] = RANDOM;
 :(before "End Primitive Recipe Implementations")
 case RANDOM: {
+  // todo: limited range of numbers, might be imperfectly random
+  // todo: thread state in extra ingredients and results
   products.resize(1);
-  // todo: replace rand()
   products.at(0).push_back(rand());
   break;
 }