Re: Math.h functions with CGFloat
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