Documentation of 'edu.rit.util.Mathe' Java class
Mathe
edu.rit.util

Class Mathe



  • public class Mathe
    extends java.lang.Object
    Class Mathe provides useful mathematical operations. The class is named "Mathe" so the compiler won't confuse it with class java.lang.Math.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static int sqrt(int x)
      Compute the integer square root of the integer x.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sqrt

        public static int sqrt(int x)
        Compute the integer square root of the integer x. The value floor(x1/2) is returned. The answer is calculated using an exact integer algorithm taken from:
        Parameters:
        x - Input.
        Returns:
        Floor(x1/2).
        Throws:
        java.lang.ArithmeticException - (unchecked exception) Thrown if x < 0.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.