Java Double Number Round roundAngle(double a, long n)

Here you can find the source of roundAngle(double a, long n)

Description

round Angle

License

Open Source License

Declaration

public static double roundAngle(double a, long n) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static final long DEFAULT_N = 1000000000;

    public static double roundAngle(double a, long n) {
        return Math.round(a * n) / n;
    }// w  w  w . jav  a 2 s.  c o  m

    public static double roundAngle(double a) {
        return roundAngle(a, DEFAULT_N);
    }
}

Related

  1. round2Places(Double input)
  2. round5(final double value)
  3. round_double(double d)
  4. round_nearestmultipleof5(double value)
  5. roundAndScale(double startValue, int places)
  6. roundAtDecimals(double number, int deci)
  7. roundAway(double d)
  8. roundAwayFromZero(double num)
  9. roundBig(double d)