Wave function collapse: Difference between revisions
C: more consistent use of indexing macros (extremely slight deoptimization -- but should be easier to read now)
(C: use macros for 2- and 3- dimensional index calculations) |
(C: more consistent use of indexing macros (extremely slight deoptimization -- but should be easier to read now)) |
||
Line 39:
}
};
/* avoid problems with slightly egative numbers and C's X%Y */
#define MOD(X,Y) ((Y)+(X))%(Y)
char *wfc(char *blocks, int *bdim /* 5,3,3 */, int *tdim /* 8,8 */) {
Line 47 ⟶ 50:
int k= j+td1*i;
int m= 4*k;
adj[
adj[
adj[
adj[
}
}
|