[iPhone] Floating Point numbers with .f and without .f Suffix
[iPhone] Floating Point numbers with .f and without .f Suffix
- Subject: [iPhone] Floating Point numbers with .f and without .f Suffix
- From: Tharindu Madushanka <email@hidden>
- Date: Tue, 12 Oct 2010 12:28:47 +0530
Hi,
I would like to clarify about the usage of .f suffix when using floating
point numbers related to iPhone. I read .f is to tell the compiler about the
number is a float at start avoid any casting.
So when we use CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat
height) I usually see people use without .f.
For example, CGRectMake(0,0,320,460) instead of
CGRectMake(0.0f,0.0f,320.0f,460.0f)
Is there any minor performance of using either approach. Could someone
kindly clarify on this.
Thanks and Kind Regards,
Tharindu Madushanka.
_______________________________________________
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