Re: Math.h functions with CGFloat
Re: Math.h functions with CGFloat
- Subject: Re: Math.h functions with CGFloat
- From: Alastair Houghton <email@hidden>
- Date: Tue, 10 Aug 2010 16:50:17 +0100
On 10 Aug 2010, at 16:28, Graham Cox wrote:
> If your code is working with CGFloat, then the warning isn't very helpful, because by using CGFloat you've elected to use 32-bit precision.
Only on 32-bit. On the 64-bit runtime, CGFloat is a double, not a float, and therein lies the problem. If you use e.g. sqrtf() on 64-bit you'll get the conversion warning, and if you use sqrt() on 32-bit and assign the result to a CGFloat, you'll get the conversion warning too.
<tgmath.h> seems like a good solution.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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