Search:

Type: Posts; User: Parranoia

Search: Search took 0.08 seconds.

  1. Replies
    10
    Views
    1,652

    [SOLVED] Re: Double rounding

    What is your value for PI? Also, the data type. I just tested this code and it works just fine. My only guess now is that your PI variable is set wrong :/



    public static double volume (int r,...
  2. Replies
    10
    Views
    1,652

    [SOLVED] Re: Double rounding

    For some odd reason it's returning a comma rather than the period. Try using this as your format "###.##"

    Not too sure why it is returning a comma there though.
  3. Replies
    10
    Views
    1,652

    [SOLVED] Re: Double rounding

    Your DecimalFormat object returns a String object. Use the Double class to parse the String and return a double value.
Results 1 to 3 of 3