aboutsummaryrefslogtreecommitdiff
path: root/randomix.c
diff options
context:
space:
mode:
authorDaniel Heckenberg <dheck@users.sourceforge.net>2003-03-09 11:10:53 +0000
committerDaniel Heckenberg <dheck@users.sourceforge.net>2003-03-09 11:10:53 +0000
commit92649e745cbbe710ffa3bec1504f877f93fa34aa (patch)
treec51a1e26288397bf97295f0d1cdda4760254cb87 /randomix.c
parent1f8e5df65d294f56735b20fdb4c8c65919609439 (diff)
Minor changes for compilation using Visual C++ 6.0 (SP3) under Windows
ncluding: - no array declaration with variable size - fixed signed/unsigned comparison warnings svn path=/trunk/externals/cxc/; revision=460
Diffstat (limited to 'randomix.c')
-rw-r--r--randomix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/randomix.c b/randomix.c
index f6dd46a..4700766 100644
--- a/randomix.c
+++ b/randomix.c
@@ -629,9 +629,9 @@ void random_tw_rand_seed (t_random_tw *x, unsigned int a, unsigned int b, unsign
x->x_mask1 = zf << (32-x->x_k1);
x->x_mask2 = zf << (32-x->x_k2);
x->x_mask3 = zf << (32-x->x_k3);
- if (a > (1<<x->x_shft1)) x->x_s1 = a;
- if (b > (1<<x->x_shft2)) x->x_s2 = b;
- if (c > (1<<x->x_shft3)) x->x_s3 = c;
+ if (a > (unsigned int)(1<<x->x_shft1)) x->x_s1 = a;
+ if (b > (unsigned int)(1<<x->x_shft2)) x->x_s2 = b;
+ if (c > (unsigned int)(1<<x->x_shft3)) x->x_s3 = c;
// rand();
}
@@ -717,7 +717,7 @@ static void random_tw_seed(t_random_tw *x, float f, float glob)
{
//x->x_state = f;
// questionable .. dont quite get how this one's seeded ..
- random_tw_rand_seed(x, f, (f*0.455777), f);
+ random_tw_rand_seed(x, (int)f, (int)(f*0.455777), (int)f);
}
static void random_tw_help(t_random_tw *x)