static char *random_word(struct mtwist_state *mt, char *w[], int nwords) { int x; x = (int) (((double) mtwist_next(mt) / (double) (0xffffffff)) * nwords); return w[x]; }
static char *qnationality(struct mtwist_state *mt) { int x; x = (int) (((double) mtwist_next(mt) / (double) (0xffffffff)) * 1000); if (x < 100) return nationality(mt); else return nothing; }
void infinite_taunt(struct mtwist_state *mt, char *buffer, int buflen) { switch (mtwist_next(mt) % 4) { case 0: infinite_taunt0(mt, buffer, buflen); break; case 1: infinite_taunt1(mt, buffer, buflen); break; case 2: infinite_taunt2(mt, buffer, buflen); break; case 3: infinite_taunt3(mt, buffer, buflen); break; default: infinite_taunt1(mt, buffer, buflen); break; } }
static char random_digit(struct mtwist_state *mt) { int x = mtwist_next(mt) % 10 + '0'; return (char) x; }
static char random_letter(struct mtwist_state *mt) { int x = mtwist_next(mt) % 26 + 'A'; return (char) x; }
enum planet_type PlanetType(struct mtwist_state *mt) { int x; x = (int) (((double) mtwist_next(mt) / (double) (0xffffffff)) * 3); return (enum planet_type) x; }