java.lang
Class Math

java.lang.Object
  extended byjava.lang.Math

public final class Math
extends Object


Field Summary
static double E
           
static double PI
           
 
Constructor Summary
Math()
           
 
Method Summary
static double abs(double val)
          Returns the absolute value of a double value.
static float abs(float val)
          Returns the absolute value of a float value.
static int abs(int val)
          Returns the absolute value of a int value.
static long abs(long val)
          Returns the absolute value of a long value.
static double acos(double val)
          Returns the arc cosine of an angle, in the range of 0.0 through pi.
static double asin(double val)
          Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
static double atan(double val)
          Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
static double atan(double a, double b)
          the same as atan2()
static double atan2(double a, double b)
          Converts rectangular coordinates (b, a) to polar (r, theta).
static double ceil(double val)
          Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.
static double cos(double val)
          Returns the trigonometric cosine of an angle.
static double exp(double val)
          Returns the exponential number e (i.e., 2.718...) raised to the power of a double value.
static double floor(double val)
          Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.
static double IEEEremainder(double f1, double f2)
          Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.
static double log(double val)
          Returns the natural logarithm (base e) of a double value.
static double max(double a, double b)
          Returns the greater of two values.
static float max(float a, float b)
          Returns the greater of two values.
static int max(int a, int b)
          Returns the greater of two values.
static long max(long a, long b)
          Returns the greater of two values.
static double min(double a, double b)
          Returns the smaller of two values.
static float min(float a, float b)
          Returns the smaller of two values.
static int min(int a, int b)
          Returns the smaller of two values.
static long min(long a, long b)
          Returns the smaller of two values.
static double pow(double a, double b)
          Returns of value of the first argument raised to the power of the second argument.
static double random()
          Returns a random number between 0.0 and 1.0.
static double rint(double value)
          returns the closest integer to the argument.
static long round(double value)
          Returns the closest long to the argument.
static int round(float value)
          Returns the closest int to the argument.
static double sin(double val)
          Returns the trigonometric sine of an angle.
static double sqrt(double val)
          Returns the square root of a double value.
static double tan(double val)
          Returns the trigonometric tangent of an angle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Field Detail

E

public static final double E

PI

public static final double PI
Constructor Detail

Math

public Math()
Method Detail

abs

public static double abs(double val)
Returns the absolute value of a double value.


abs

public static float abs(float val)
Returns the absolute value of a float value.


abs

public static int abs(int val)
Returns the absolute value of a int value.


abs

public static long abs(long val)
Returns the absolute value of a long value.


acos

public static double acos(double val)
Returns the arc cosine of an angle, in the range of 0.0 through pi.


asin

public static double asin(double val)
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.


atan

public static double atan(double val)
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.


atan

public static double atan(double a,
                          double b)
the same as atan2()


atan2

public static double atan2(double a,
                           double b)
Converts rectangular coordinates (b, a) to polar (r, theta).


ceil

public static double ceil(double val)
Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer.


cos

public static double cos(double val)
Returns the trigonometric cosine of an angle.


exp

public static double exp(double val)
Returns the exponential number e (i.e., 2.718...) raised to the power of a double value.


floor

public static double floor(double val)
Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer.


IEEEremainder

public static double IEEEremainder(double f1,
                                   double f2)
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.


log

public static double log(double val)
Returns the natural logarithm (base e) of a double value.


max

public static double max(double a,
                         double b)
Returns the greater of two values.


min

public static double min(double a,
                         double b)
Returns the smaller of two values.


max

public static float max(float a,
                        float b)
Returns the greater of two values.


min

public static float min(float a,
                        float b)
Returns the smaller of two values.


max

public static int max(int a,
                      int b)
Returns the greater of two values.


min

public static int min(int a,
                      int b)
Returns the smaller of two values.


max

public static long max(long a,
                       long b)
Returns the greater of two values.


min

public static long min(long a,
                       long b)
Returns the smaller of two values.


pow

public static double pow(double a,
                         double b)
Returns of value of the first argument raised to the power of the second argument.


random

public static double random()
Returns a random number between 0.0 and 1.0.


rint

public static double rint(double value)
returns the closest integer to the argument.


round

public static long round(double value)
Returns the closest long to the argument.


round

public static int round(float value)
Returns the closest int to the argument.


sin

public static double sin(double val)
Returns the trigonometric sine of an angle.


sqrt

public static double sqrt(double val)
Returns the square root of a double value.


tan

public static double tan(double val)
Returns the trigonometric tangent of an angle.