:: Re: [Frei0r] "rgbnoise" plugin
Top Pagina
Delete this message
Reply to this message
Auteur: Steinar H. Gunderson
Datum:  
Aan: Minimalistic plugin API for video effects
Onderwerp: Re: [Frei0r] "rgbnoise" plugin
On Thu, Oct 04, 2012 at 05:41:03PM +0300, Janne Liljeblad wrote:
> 32767 is a number I got from internet as a (probably) guaranteed min
> value for RAND_MAX. Just to keep things simple, I do not want to
> discover what the number is runtime -1 is just to be sure that no
> overflows happen, ugly, but always works.


Are you serious -- are you worried that int might be 16 bits?

> Tomorrow I'll send a patch to avoid the unnecessary multiplication by 127.0


You ignored my part about the unneccessary branch. And the part about the
unnecessary float-to-int conversions.

/* Steinar */
--
Homepage: http://www.sesse.net/