• 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: Nicko van Someren <email@hidden>
  • Date: Fri, 22 Jul 2005 18:15:04 +0100

On 22 Jul 2005, at 18:00, Ian was here wrote:

I've tried all that before, and the result always
yields zero.

float            fBlue = (float)alphaComp / (float)255.0;
float            fBlue = (float)alphaComp / 255.0f;
float            fBlue = (float)alphaComp / 255.0L;

In that case have you tried printing out the value of alphaComp on the line before you do the division? Maybe it's always zero to start with and the bug is elsewhere.


    Nicko

_______________________________________________
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: 
 >Re: Strange issue when converting from hex to float (From: Ian was here <email@hidden>)

  • Prev by Date: changing the text color of disabled textfields
  • Next by Date: Upgrade issues
  • 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