Java Rounding Mode sqrt(int x, RoundingMode mode)

Here you can find the source of sqrt(int x, RoundingMode mode)

Description

sqrt

License

Apache License

Declaration

public static int sqrt(int x, RoundingMode mode) 

Method Source Code


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

import java.math.RoundingMode;
import com.google.common.math.IntMath;
import com.google.common.math.LongMath;

public class Main {

    public static int sqrt(int x, RoundingMode mode) {
        return IntMath.sqrt(x, mode);
    }/*from   ww  w.j a  v  a 2  s . co  m*/

    public static long sqrt(long x, RoundingMode mode) {
        return LongMath.sqrt(x, mode);
    }
}

Related

  1. getOppositeRoundingMode(RoundingMode roundingMode)
  2. normalizeRoundingMode(String roundingMode)
  3. roundHalfUp(double value)