Java Number Round roundNumber(double rowNumber, int roundingPoint)

Here you can find the source of roundNumber(double rowNumber, int roundingPoint)

Description

round Number

License

Apache License

Declaration

public static double roundNumber(double rowNumber, int roundingPoint) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static double roundNumber(double rowNumber, int roundingPoint) {
        double base = Math.pow(10D, roundingPoint);
        return (double) Math.round(rowNumber * base) / base;
    }//w  w w .ja  v  a2s  .  c  o  m
}

Related

  1. roundM(int n, int m)
  2. roundMinAndMax(double min, double max, int tickCount)
  3. roundMultiplier(double n)
  4. roundNearest(double v, double target)
  5. roundNicely(double dbl)
  6. roundNumber(double theNumber, int places)
  7. roundNumber(float input, float rounding)
  8. roundNumber(String n)
  9. roundNumberTo(double value, int decimals)