Floats (get rid of zero's)

Discussion in 'Mac Programming' started by Boeing747, Jul 28, 2011.

  1. Boeing747
    Expand Collapse
    macrumors member

    Joined:
    Jul 10, 2011
    Location:
    In Steve Job's Closet
    #1
    Hey,
    Just wondering if there is a way for me to only show the amount of decimal points there are in a float in my program (instead of 1.5000000 1.5 or 1.000000 to 1.

    Thanks,
    B747
     
  2. balamw
    Expand Collapse
    Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
  3. Boeing747
    Expand Collapse
    thread starter macrumors member

    Joined:
    Jul 10, 2011
    Location:
    In Steve Job's Closet
    #3
    Objective C
    Xcode 4
     
  4. lee1210
    Expand Collapse
    macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
  5. balamw
    Expand Collapse
    Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
  6. Boeing747
    Expand Collapse
    thread starter macrumors member

    Joined:
    Jul 10, 2011
    Location:
    In Steve Job's Closet

Share This Page