libperun

Class std.math.Math

Synopsis

public static class Math

This static class contains various math functions.

Fields

public static final double PI

The value of pi (ratio between circle circumference and diameter).

public static final double E

The value of Euler's constant.

public static final double NaN

Not-a-number constant.

public static final double INFINITY

Positive infinity.

Constructors

Methods

public static double acos(double x);

Calculate the principle arc-cosine of the given input in radians.

public static double asin(double x);

Calculate the principle arc-sine of the given input in radians.

public static double atan(double x);

Calculate the principle arc tangent of the input in radians.

public static double atan2(double x,double y);

Returns the arc tangent in radians of y/x based on the signs of both values to determine the correct quadrant.

public static double cos(double x);

Returns the cosine of the specified angle (in radians).

public static double cosh(double x);

Returns the hyperbolic cosine of the specified angle (in radians).

public static double sin(double x);

Returns the sine of the specified angle (in radians).

public static double sinh(double x);

Returns the hyperbolic sine of the specified angle (in radians).

public static double tan(double x);

Returns the tangent of the specified angle (in radians).

public static double tanh(double x);

Returns the hyperbolic tangent of the specified angle (in radians).

public static double exp(double x,double y);

Returns x raised to the power y.

public static double exp(double x);

Returns e to the power x.

public static double log(double x);

Returns the base-10 logarithm of x.

public static double ln(double x);

Returns the natural logarithm of x.

public static double sqrt(double x);

Returns the square root of x.

public static double floor(double x);

Returns the value of x rounded down to the nearest integer.

public static double ceil(double x);

Returns the value of x rounded up to the nearest integer.

public static double abs(double x);

Returns the absolute value of x (x converted to a positive value).

public static int abs(int x);

Returns the absolute value of x (x converted to a positive value).