Java Number Format formatNumber(double dscore)

Here you can find the source of formatNumber(double dscore)

Description

format Number

License

Open Source License

Declaration

static String formatNumber(double dscore) 

Method Source Code

//package com.java2s;

public class Main {
    static String formatNumber(double dscore) {
        long score = Math.round(dscore * 100);
        return score / 100 + "." + (score % 100 < 10 ? "0" : "") + score % 100;
    }// w  w w .j  av  a  2  s.  com
}

Related

  1. formatLineNumber(String lineNumber)
  2. formatMs(long number)
  3. formatNationalNumber(String nationalNumber)
  4. formatNCPDPNumber(String origNumber, int decimalPoints)
  5. formatNumber(double dd)
  6. formatNumber(double number, int decimalPlaces)
  7. formatNumber(Double val, int numDec, int width)
  8. formatNumber(double value)
  9. formatNumber(double value)