1. Download our Official Android App: Forums for Android!

Apps Forcing Double datatype to have two decimal places

Discussion in 'Android Development' started by paul72, Sep 10, 2010.

  1. paul72

    paul72 Newbie
    Thread Starter
    Rank:
    None
    Points:
    35
    Posts:
    10
    Joined:
    Jul 20, 2010

    Jul 20, 2010
    10
    0
    35
    Systems Analyst
    Louisiana
    I'm working on a calculator that deals with currency amounts and I'm trying to restrict the results to have only two decimal places. I've been scouring the web and have tried several things like converting to an integer, then back to a float and dividing by 100, etc but I haven't had luck yet.

    Can anyone offer a suggestion? Thank you!
     

    Advertisement

Share This Page

Loading...