Methods in the Math class in Java

public static double abs(double a)

Returns the absolute value of the specified double..

public static double acos(double a)

Returns the arc cosine of an angle, in the range of 0.0 through pi.

public static double asin(double a)

Returns the arc sine of an angle, in the range of –pi/2 through pi/2.

public static double atan(double a)

Returns the arc tangent of an angle, in the range of –pi/2 through pi/2.

public static double cos(double a)

Returns the cosine of an angle.

public static double exp(double a)

Returns Euler’s number e raised to the power of the specified double.

public static double log(double a)

Returns the natural logarithm (base e) of the specified double.

public static double log10(double a)

Returns the base 10 logarithm of the specified double.

public static double max(double a, double b)

Returns the greater of the two specified double values.

public static double min(double a, double b)

Returns the smaller of the two specified double values.

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.