• 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: Math.h functions with CGFloat
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Math.h functions with CGFloat


  • Subject: Re: Math.h functions with CGFloat
  • From: Graham Cox <email@hidden>
  • Date: Wed, 11 Aug 2010 00:19:32 +1000

On 11/08/2010, at 12:12 AM, steven Hooley wrote:

> Because CGFloat is typedef'd to float on 32bit and double on 64bit i
> have to swap between, eg,  atan and atanf depending on my build
> settings. I have a framework which is intended to support 32bit and
> 64bit.


Just use atan(). 32-bit floats are promoted to doubles silently. There is a slight performance penalty but it's absolutely tiny.

--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Math.h functions with CGFloat
      • From: steven Hooley <email@hidden>
References: 
 >Math.h functions with CGFloat (From: steven Hooley <email@hidden>)
 >Re: Math.h functions with CGFloat (From: steven Hooley <email@hidden>)

  • Prev by Date: Re: Math.h functions with CGFloat
  • Next by Date: Re: Math.h functions with CGFloat
  • Previous by thread: Re: Math.h functions with CGFloat
  • Next by thread: Re: Math.h functions with CGFloat
  • Index(es):
    • Date
    • Thread