Re: [AD] Allegro 4.2.0: hsv_to_rgb needless assert

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Nevermind - this was fixed in TOT. Too bad it crept into an official release. Now I have to work around it in AGL...

Robert Jr Ohannessian wrote:
The assert in hsv_to_rgb is superfluous:

    void hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
    {
[snip]
       ASSERT(h >= 0 && h <= 360);
[snip]
          h = fmod(h, 360.0f) / 60.0f;


Either the assert stays and fmod() goes away, or fmod() stays and the assert goes.

My vote is to keep fmod() around and remove the assert, to be compatible with the release version.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/