From b418fb91e7bb45d7b5f1eb8b19703441ae94eb13 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 9 Feb 2006 16:18:39 +0000 Subject: got everything building and working, including building single-object/single-file objects with a shared dylib. Now got to get it integrated into the build system svn path=/trunk/externals/fftease/; revision=4574 --- lib/PenroseRand.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/PenroseRand.c (limited to 'lib/PenroseRand.c') diff --git a/lib/PenroseRand.c b/lib/PenroseRand.c new file mode 100644 index 0000000..98f396e --- /dev/null +++ b/lib/PenroseRand.c @@ -0,0 +1,13 @@ +#include "PenroseRand.h" + +float rrand(int *seed) +{ + int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777; + return((float)i/16384. - 1.); +} + +float prand(int *seed) +{ + int i = ((*seed = *seed * 1103515245 + 12345)>>16) & 077777; + return((float)i/32768.); +} -- cgit v1.2.1