• 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: rounded decimals?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rounded decimals?


  • Subject: Re: rounded decimals?
  • From: Dave DeLong <email@hidden>
  • Date: Thu, 07 Apr 2005 15:22:00 -0600

You could take a look at the NSNumberFormatter class.  You could use a format string to the effect of @"#,###.00".

HTH,

Dave
 
On Apr 7, 2005, at 2:52 PM, Brett O'Donnell wrote:

(Sorry if this is a newbie question)

What is the easiest way to round a double number to a certain decimal place? 

The line is currently

    [textRho setDoubleValue:rho];

Thanks in advance for any help you can give. 

Thanks, 
Brett O'Donnell
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >rounded decimals? (From: "Brett O'Donnell" <email@hidden>)

  • Prev by Date: Re: Bring all to front not working?
  • Next by Date: How to disable Spellcheck on NSTextView
  • Previous by thread: rounded decimals?
  • Next by thread: Re: rounded decimals?
  • Index(es):
    • Date
    • Thread