/*
** util
**
**   misc. utility functions
**
*/

/* 
**   Scott "Jerry" Lawrence
**   2000 January 23
**   j@absynth.com
*/

/*
** $Id: util.c,v 1.2 2000/02/07 22:21:02 sdlpci Exp sdlpci $
**
** $Log: util.c,v $
 * Revision 1.2  2000/02/07  22:21:02  sdlpci
 * removed the conditional structure -- it was not needed.
 *
 * Revision 1.1  2000/01/24  20:31:03  sdlpci
 * Initial revision
 *
 * Revision 1.1  2000/01/24  20:31:03  sdlpci
 * Initial revision
 *
**
*/

#include <stdio.h>
#include <stdlib.h>   /* for malloc/free */
#include <string.h>   /* for memset      */


int random_int(int min, int max)
{
    int r;
    r = min+ (int) ((float)(max-min+1)*rand()/(RAND_MAX+1.0));
    return r;
}

long Two_to_the_B(long b)
{
    return 1<<b;
/*
    if (b == 0) return 0l;

    printf ("%ld to the %ld = ", a,b); 
    while (b>0)
    {
        a *= a;
	b--;
    }

    return a;
*/
}

