RoboJDETM v2.0

java.lang
Class Math

java.lang.Object
  extended by java.lang.Math

public final class Math
extends Object

Implements math library methods.


Field Summary
static double E
          The constant e.
static double PI
          The constant Pi.
 
Method Summary
static double abs(double value)
          Returns absolute value of the argument.
static float abs(float value)
          Returns absolute value of the argument.
static int abs(int value)
          Returns absolute value of the argument.
static double acos(double value)
          Returns the arc cosine of the argument.
static double asin(double value)
          Returns the arc sine of the argument.
static double atan(double value)
          Returns the arc tangent of the argument.
static double atan2(double y, double x)
          Returns the angle in radians given the cartesian coordinates x and y.
static double ceil(double value)
          Returns value of the next integer which is higher than the argument.
static double cos(double radians)
          Returns the cosine of the angle.
static double exp(double power)
          Returns e raised to the specified power.
static double floor(double value)
          Returns value of the next integer which is lower than the argument.
static double log(double value)
          Returns the natural log of a double value.
static double max(double value1, double value2)
          Returns the argument with the maximum value.
static int max(int value1, int value2)
          Returns the argument with the maximum value.
static double min(double value1, double value2)
          Returns the argument with the minimum value.
static int min(int value1, int value2)
          Returns the argument with the minimum value.
static double pow(double base, double exponent)
          Raises a base to an exponent.
static double random()
          Returns a random number between 0.0 and 1.0.
static int round(float value)
          Rounds the argument to an integer.
static double sin(double radians)
          Returns the sine of the angle.
static double sqrt(double value)
          Returns the square root of the argument.
static double tan(double radians)
          Returns the tangent of the angle.
static double toDegrees(double radians)
          Converts angle radians to degrees.
static double toRadians(double degrees)
          Converts angle in degrees to radians.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Field Detail

E

public static final double E
The constant e.

See Also:
Constant Field Values

PI

public static final double PI
The constant Pi.

See Also:
Constant Field Values
Method Detail

abs

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

Parameters:
value - argument value
Returns:
absolute value of value

abs

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

Parameters:
value - argument value
Returns:
absolute value of value

abs

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

Parameters:
value - argument value
Returns:
absolute value of value

acos

public static double acos(double value)
Returns the arc cosine of the argument.

Parameters:
value - argument value
Returns:
arc cosine of value

asin

public static double asin(double value)
Returns the arc sine of the argument.

Parameters:
value - argument value
Returns:
arc sine of value

atan

public static double atan(double value)
Returns the arc tangent of the argument.

Parameters:
value - argument value
Returns:
arc tangent of value

atan2

public static double atan2(double y,
                           double x)
Returns the angle in radians given the cartesian coordinates x and y.

Parameters:
y - y coordinate
x - x coordinate
Returns:
polar coordiantes angle in radians of the point x, y

ceil

public static double ceil(double value)
Returns value of the next integer which is higher than the argument.

Parameters:
value - argument
Returns:
next higher integer cast to a double

cos

public static double cos(double radians)
Returns the cosine of the angle.

Parameters:
radians - angle in radians
Returns:
cosine of angle

exp

public static double exp(double power)
Returns e raised to the specified power.

Parameters:
power - power to raise e to
Returns:
e raised to power

floor

public static double floor(double value)
Returns value of the next integer which is lower than the argument.

Parameters:
value - argument
Returns:
next lower integer cast to a double

log

public static double log(double value)
Returns the natural log of a double value.

Parameters:
value - value to take natural log of
Returns:
natural log of value

max

public static double max(double value1,
                         double value2)
Returns the argument with the maximum value.

Parameters:
value1 - first argument
value2 - second argument
Returns:
the maximum of the two arguments

max

public static int max(int value1,
                      int value2)
Returns the argument with the maximum value.

Parameters:
value1 - first argument
value2 - second argument
Returns:
the maximum of the two arguments

min

public static double min(double value1,
                         double value2)
Returns the argument with the minimum value.

Parameters:
value1 - first argument
value2 - second argument
Returns:
the minimum of the two arguments

min

public static int min(int value1,
                      int value2)
Returns the argument with the minimum value.

Parameters:
value1 - first argument
value2 - second argument
Returns:
the minimum of the two arguments

pow

public static double pow(double base,
                         double exponent)
Raises a base to an exponent.

Parameters:
base - base value
exponent - exponent value
Returns:
base raised to exponent

random

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


round

public static int round(float value)
Rounds the argument to an integer.

Parameters:
value - argument
Returns:
argument rounded to an integer

sin

public static double sin(double radians)
Returns the sine of the angle.

Parameters:
radians - angle in radians
Returns:
sine of angle

sqrt

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

Parameters:
value - argument value
Returns:
square root of value

tan

public static double tan(double radians)
Returns the tangent of the angle.

Parameters:
radians - angle in radians
Returns:
tangent of angle

toDegrees

public static double toDegrees(double radians)
Converts angle radians to degrees.

Parameters:
radians - angle in radians
Returns:
angle in degrees

toRadians

public static double toRadians(double degrees)
Converts angle in degrees to radians.

Parameters:
degrees - angle in degrees
Returns:
angle in radians

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com