Quantcast
Channel: Cemetech
Viewing all articles
Browse latest Browse all 75829

Casio Prizm/FX Development & Programming :: RE: Useful Prizm Routines

$
0
0
Author: KermMartian
Posted: 16 Jan 2013 09:13:48 pm (GMT -5)

I didn't make these, but I can't seem to find them anywhere in this thread, so here goes:


Code:
unsigned int random(void);
unsigned int srandom(int seed);

static unsigned int lastrandom=0x12345678;
unsigned int random(void) {
   return srandom(0);
}

unsigned int srandom(int seed){
    if (seed) lastrandom=seed;
    lastrandom = ( 0x41C64E6D*lastrandom ) + 0x3039;
    return ( lastrandom >> 16 );
}

_________________




Viewing all articles
Browse latest Browse all 75829

Latest Images

Trending Articles



Latest Images