• 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
[iPhone] Floating Point numbers with .f and without .f Suffix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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

  • Follow-Ups:
    • Re: [iPhone] Floating Point numbers with .f and without .f Suffix
      • From: Quincey Morris <email@hidden>
    • Re: [iPhone] Floating Point numbers with .f and without .f Suffix
      • From: Rick Mann <email@hidden>
  • Prev by Date: Re: ivars and fundamental types
  • Next by Date: Re: [iPhone] Floating Point numbers with .f and without .f Suffix
  • Previous by thread: Re: add new NSTreenode to NSTreecontroller
  • Next by thread: Re: [iPhone] Floating Point numbers with .f and without .f Suffix
  • Index(es):
    • Date
    • Thread