Re: Strange issue when converting from hex to float
Re: Strange issue when converting from hex to float
- Subject: Re: Strange issue when converting from hex to float
- From: Will Mason <email@hidden>
- Date: Thu, 21 Jul 2005 10:19:44 -0700 (PDT)
> float fAlpha = alphaComp / 255L;
What if you explicitly make the divisor a floating-point number:
float fAlpha = alphaComp / 255.0;
It seems to me that would make the division operation exist in the
floating-point world, rather than doing integral division, the result
of which is then converted to a floating-point number.
Just a thought,
Will
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden