more clenaup, expect more bugs

This commit is contained in:
tth
2021-03-17 18:32:51 +01:00
parent 706e218ff0
commit 3632dc1680
23 changed files with 98 additions and 137 deletions

View File

@@ -1,7 +1,6 @@
/*
testing some random funcs.
*/
* This is an eternal WIP, sorry...
*/
#include <stdio.h>
#include <stdlib.h>
@@ -56,7 +55,6 @@ for (x=0; x<fimg->width; x++) {
// fprintf(stderr, " %6d %f\n", x, val);
}
return 0;
}
/* --------------------------------------------------------------------- */
@@ -88,14 +86,14 @@ for (y=1; y<fimg->height; y++) {
return 0;
}
/* --------------------------------------------------------------------- */
int fimg_multirandom(FloatImg *fimg)
int fimg_multirandom(FloatImg *fimg, long nbpass)
{
int foo, x, y;
#define RI ( (rand()/7) + (rand()/9) )
#define RD ( (drand48()/7) + (drand48()/7) )
for (foo=0; foo<100000000; foo++)
for (foo=0; foo<nbpass; foo++)
{
x = RI % fimg->width;
y = RI % fimg->height;