#ifndef V_RGEN_H
#define V_RGEN_H

#define	CONFIG_FAST_RGEN

#ifdef	CONFIG_FAST_RGEN

#define NTAB 32

typedef struct ran_context_s
{
	int idum;
	long idum2;
	long iy;
	long iv[NTAB];
} ran_context_t, *ran_context_p;

#endif	/* CONFIG_FAST_RGEN */

#ifdef	__cplusplus
extern "C" {
#endif	/* __cplusplus */
	vhandle_t	V_GLOBAL	urnCreateGenerator(int seed);
	long	V_GLOBAL	urnNextLong(vhandle_t gen,long upper_bound);
	vec_t	V_GLOBAL	urnNextFloat(vhandle_t gen);
	void	V_GLOBAL	urnDestroyGenerator(vhandle_t gen);
	vec_t	V_GLOBAL	urnNextFloatRange(vhandle_t gen,vec_t min,vec_t max);
	void	V_GLOBAL	urnNextVec3Range(vhandle_t gen,vec3_t vec3_ret,vec_t min,vec_t max);
	void	V_GLOBAL	urnNextVec3RangeV(vhandle_t gen,vec3_t vec3_ret,vec3_t mins,vec3_t maxs);
	void	V_GLOBAL	urnNextVectorRange(vhandle_t gen,vector_p vec_ret,vec_t min,vec_t max);
	void	V_GLOBAL	urnNextVectorRangeV(vhandle_t gen,vector_p vec_ret,vector_p mins,vector_p maxs);
#ifdef	__cplusplus
}
#endif	/* __cplusplus */

#endif	/* V_RGEN_H */
