img
Method
Description
static int abs(int arg)
Returns the absolute value of arg.
static long abs(long arg)
Returns the absolute value of arg.
static float abs(float arg)
Returns the absolute value of arg.
static double abs(double arg)
Returns the absolute value of arg.
static double ceil(double arg)
Returns the smallest whole number greater than or
equal to arg.
static double floor(double arg)
Returns the largest whole number less than or equal to arg.
static int max(int x, int y)
Returns the maximum of x and y.
static long max(long x, long y)
Returns the maximum of x and y.
static float max(float x, float y)
Returns the maximum of x and y.
static double max(double x, double y)
Returns the maximum of x and y.
static int min(int x, int y)
Returns the minimum of x and y.
static long min(long x, long y)
Returns the minimum of x and y.
static float min(float x, float y)
Returns the minimum of x and y.
static double min(double x, double y)
Returns the minimum of x and y.
static double nextAfter(double arg,
Beginning with the value of arg, returns the next value in
double toward)
the direction of toward. If arg == toward, then toward is
returned. (Added by Java SE 6.)
static float nextAfter(float arg,
Beginning with the value of arg, returns the next value in
double toward)
the direction of toward. If arg == toward, then toward is
returned. (Added by Java SE 6.)
static double nextUp(double arg)
Returns the next value in the positive direction from arg.
(Added by Java SE 6.)
static float nextUp(float arg)
Returns the next value in the positive direction from arg.
(Added by Java SE 6.)
static double rint(double arg)
Returns the integer nearest in value to arg.
static int round(float arg)
Returns arg rounded up to the nearest int.
static long round(double arg)
Returns arg rounded up to the nearest long.
static float ulp(float arg)
Returns the ulp for arg.
static double ulp(double arg)
Returns the ulp for arg.
TABLE 16-16
The Rounding Methods Defined by Math
Miscellaneous Math Methods
In addition to the methods just shown, Math defines several other methods, which are
shown here:
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home