• 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: Steve Mills <email@hidden>
  • Date: Mon, 26 Aug 2002 17:45:46 -0500

on 2002/08/26 17:10, Joshua D. Orr at email@hidden wrote:

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

How 'bout:

num = (float)round(num * 1000.0) / 1000.0;

Steve Mills
Drummer, Mac geek
http://members.home.net/sjmills5/
_______________________________________________
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: Simple web browser
  • Next by Date: Re: Can a menu title be colored?
  • Previous by thread: Seeking Cocoa Game Programmers
  • Next by thread: Re: Decimal Rounding...
  • Index(es):
    • Date
    • Thread