Math Class Methods
Note that the methods are static
|
Method |
What it Returns |
|
static int abs(int x) |
Absolute value of an integer x |
|
static double abs (double x) |
Absolute value of a double x |
|
static double pow (double base, double exponent) |
Base raised to the exponent |
|
static long round (double x) |
X rounded to the nearest whole number. Returned value must be cast to be an int before assignment to an int variable |
|
static int max (int a, int b) |
The greater of a and b |
|
static int min (int a, int b) |
The lesser of a and b |
|
static double sqrt (double x) |
Square root of x |