Re: Decimal Rounding...
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.