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

Simple Rounding Question


  • Subject: Simple Rounding Question
  • From: Ian was here <email@hidden>
  • Date: Sun, 2 Apr 2006 22:15:04 -0700 (PDT)

Given the following float value:


3.14159


I would like to be able to round to the nearest
hundredth or nearest thousandth. I've searched through
the ANSI C math functions and haven't found anything
that addresses this. I was wondering if anyone knows
of any function or method to round to the desired
digit.


Thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: Simple Rounding Question
      • From: Markus Hitter <email@hidden>
  • Prev by Date: Re: vImage crop?
  • Next by Date: Re: Weirdness in my PowerBook... Now reproducible
  • Previous by thread: repositioning NSSplitView divider with NSWindow windowDidResize:
  • Next by thread: Re: Simple Rounding Question
  • Index(es):
    • Date
    • Thread