6
/* return the bigger of the two arguments */
7
static /*inline*/ int kpt_max(const int a, const int b) {
11
/* return the smaller of the two arguments */
12
static /*inline*/ int kpt_min(const int a, const int b) {
16
/* return a random number between 0 and max (both inclusive)*/
17
static /*inline*/ int irand(const int max) {
18
return (int) (1.0*max*rand()/(RAND_MAX+1.0));