• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Strange issue when converting from hex to float
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Strange issue when converting from hex to float (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Strange issue when converting from hex to float
  • Next by Date: Re: Strange issue when converting from hex to float
  • Previous by thread: Re: Strange issue when converting from hex to float
  • Next by thread: Re: Strange issue when converting from hex to float
  • Index(es):
    • Date
    • Thread