lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Sean Conner once stated:
> 
>   Or perhaps:
> 
> 	double       ds = luaL_checknumber(L,1);
> 	unsigned int s;
> 
> 	if (ds < 1.0)
> 	  s = (unsigned int)(ds * (double)UINT_MAX);
> 	else if (ds > UINT_MAX)
>  	  s = (unsigned int)fmod(ds,UINT_MAX);
> 	else
> 	  s = (unsigned int)ds;
> 
> 	srand(ds);

  I need an editor.  I mean

	srand(s);

  -spc (Sigh)