aboutsummaryrefslogtreecommitdiff
path: root/modules/permut.c
diff options
context:
space:
mode:
authorTom Schouten <doelie@users.sourceforge.net>2003-09-12 22:26:57 +0000
committerTom Schouten <doelie@users.sourceforge.net>2003-09-12 22:26:57 +0000
commit494a07a361fe4ee0e54f77468a976b1a77818770 (patch)
treeb784b32b2a29e379c6ae5947cdcdcdaadde72b5e /modules/permut.c
parent9f8757ccf742d984bd1c1a5d1e5906e9fd50784e (diff)
creb 0.9.0
svn path=/trunk/externals/creb/; revision=956
Diffstat (limited to 'modules/permut.c')
-rw-r--r--modules/permut.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/permut.c b/modules/permut.c
index bc143d2..7738f84 100644
--- a/modules/permut.c
+++ b/modules/permut.c
@@ -20,9 +20,10 @@
*/
-#include "m_pd.h"
#include <math.h>
#include <stdlib.h>
+//#include "m_pd.h"
+#include "extlib_util.h"
@@ -64,7 +65,8 @@ static void permut_random(t_permut *x, t_floatarg seed)
int *p = x->x_ctl.c_permutationtable;
int r, last = 0;
- srand(* ((unsigned int *)(&seed)));
+ //srand(* ((unsigned int *)(&seed)));
+ srand (((t_flint)seed).i);
if(p)
{
@@ -91,7 +93,8 @@ static void permut_random(t_permut *x, t_floatarg seed)
static void permut_bang(t_permut *x)
{
unsigned int r = rand();
- permut_random(x, *((float *)(&r)));
+ //permut_random(x, *((float *)(&r)));
+ permut_random(x, ((t_flint)r).f);
}
static void permut_resize_table(t_permut *x, int size)