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

Re: Simple Rounding Question


  • Subject: Re: Simple Rounding Question
  • From: Markus Hitter <email@hidden>
  • Date: Mon, 3 Apr 2006 09:57:29 +0200


Am 03.04.2006 um 07:15 schrieb Ian was here:

Given the following float value:

3.14159

I would like to be able to round to the nearest
hundredth or nearest thousandth.

Nobody answered for more than two hours? That's odd.

floor((x * 1000) + 0.5) / 1000



Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ 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: 
 >Simple Rounding Question (From: Ian was here <email@hidden>)

  • Prev by Date: Re: Tell active app to paste
  • Next by Date: NSLayoutManager causing crash in resizeSubviewsWithOldSize?
  • Previous by thread: Simple Rounding Question
  • Next by thread: how to bypass............ical and address book.........to interact with entourage using sync services
  • Index(es):
    • Date
    • Thread