Rounding a double

Discussion in 'iOS Development' started by jleibsly2002, Dec 24, 2008.

  1. jleibsly2002

    jleibsly2002 New Member

    Joined:
    Nov 5, 2007
    Messages:
    13
    Likes Received:
    0
    Hi, I just can't figure out how to round a double to two decimal places. Does anybody know how?

    Thank you in advance.
  2. cacman93

    cacman93 Banned

    Joined:
    Jul 13, 2008
    Messages:
    1,061
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    well, make sure you come in on a 45 degree angle to the base and DON"T SLIDE cause then you can't round 2nd (I have no idea about code

    Please Register or Log in to view images

  3. Chicken

    Chicken Retired Moderator

    Joined:
    Feb 17, 2008
    Messages:
    2,494
    Likes Received:
    7
    Device:
    iPhone 5S
    I think from what i saw %f (float) then it would be %4 or 3 I THINK
  4. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    Look in math.h. You'll find your answer there.

Share This Page