• 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: Decimal Rounding...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Decimal Rounding...


  • Subject: Re: Decimal Rounding...
  • From: Itrat Khan <email@hidden>
  • Date: Tue, 27 Aug 2002 14:18:08 -0400

On Monday, August 26, 2002, at 06:10 PM, Joshua D. Orr wrote:

I am trying to find a class to help me round floats to three decimal places.


I thought about using NSDecimalNumber, but I am having trouble finding an easy way to make one using a number from a float.

Use the inherited methods, such as [NSDecimalNumber numberWithFloat:1.33], then use the instance method decimalNumberByRoundingWithBehavior:. Look at the NSDecimalNumberBehaviors protocol for more information on how to set rounding behaviour.

Itrat.

............................................................
Modeless Software, Inc.
London, Ontario (Canada)
Tel: +1 519 473 2037
Web: www.liquidledger.com
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Decimal Rounding... (From: "Joshua D. Orr" <email@hidden>)

  • Prev by Date: [ANNOUNCE] Accessibility email list
  • Next by Date: Re: AddressBook - ABMultiValue
  • Previous by thread: Re: Decimal Rounding...
  • Next by thread: Invisible files/folders in NSOpenPanel
  • Index(es):
    • Date
    • Thread