public class Maths extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
E
Euler's number e, the base of natural logarithms.
|
static double |
Infinity
Positive infinite floating point value.
|
static double |
NaN
Not-a-Number floating point value.
|
static double |
PI
Pi, the ratio of the circumference of a circle to its diameter.
|
| Modifier and Type | Method and Description |
|---|---|
static double |
acos(double x)
Arc cosine of an angle.
|
static double |
acosh(double x)
Inverse hyperbolic cosine.
|
static double |
asin(double x)
Arc sine of an angle.
|
static double |
asinh(double x)
Inverse hyperbolic sine.
|
static double |
atan(double x)
Arc tangent of an angle.
|
static double |
atan2(double y,
double x)
Converts rectangular coordinates (
x,y)
to polar (r,theta). |
static double |
atanh(double x)
Inverse hyperbolic tangent.
|
static double |
cos(double theta)
Cosine of an angle.
|
static double |
cosh(double x)
Hyperbolic cosine.
|
static double |
exp(double x)
Euler's number e raised to a power.
|
static double |
exp10(double x)
Power of 10.
|
static double |
hypot(double... xs)
Returns the square root of the sum of squares of its arguments.
|
static double |
ln(double x)
Natural logarithm.
|
static double |
log10(double x)
Logarithm to base 10.
|
static double |
pow(double a,
double b)
Exponentiation.
|
static double |
sin(double theta)
Sine of an angle.
|
static double |
sinh(double x)
Hyperbolic sine.
|
static double |
sqrt(double x)
Square root.
|
static double |
square(double x)
Raise to the power 2.
|
static double |
symlog(double linthresh,
double linscale,
double x)
Symmetric logarithm mapping function.
|
static double |
tan(double theta)
Tangent of an angle.
|
static double |
tanh(double x)
Hyperbolic tangent.
|
public static final double E
public static final double PI
public static final double Infinity
public static final double NaN
NaN!=NaN).
For most purposes this is equivalent to the blank value.public static double sin(double theta)
theta - an angle, in radians.public static double cos(double theta)
theta - an angle, in radians.public static double tan(double theta)
theta - an angle, in radians.public static double asin(double x)
x - the value whose arc sine is to be returned.public static double acos(double x)
x - the value whose arc cosine is to be returned.public static double atan(double x)
x - the value whose arc tangent is to be returned.public static double ln(double x)
x - argumentpublic static double exp(double x)
x - the exponent to raise e to.public static double log10(double x)
x - argumentpublic static double exp10(double x)
pow(10,x).x - argumentpublic static double sqrt(double x)
x - a value.x.
If the argument is NaN or less than zero, the result is NaN.public static double square(double x)
x - a valuepublic static double hypot(double... xs)
xs - one or more numeric valuespublic static double atan2(double y,
double x)
x,y)
to polar (r,theta).
This method computes the phase
theta by computing an arc tangent
of y/x in the range of -pi to pi.y - the ordinate coordinatex - the abscissa coordinatetheta component (radians) of the point
(r,theta)
in polar coordinates that corresponds to the point
(x,y) in Cartesian coordinates.public static double pow(double a,
double b)
a - the base.b - the exponent.ab.public static double sinh(double x)
x - parameterpublic static double cosh(double x)
x - parameterpublic static double tanh(double x)
x - parameterpublic static double asinh(double x)
x - parameterpublic static double acosh(double x)
x - parameterpublic static double atanh(double x)
x - parameterpublic static double symlog(double linthresh,
double linscale,
double x)
linthresh)
and positive/negative logarithmic outside that region.
The function is:
|x| <= linthresh:
x * linscale / linthresh
|x| >= linthresh:
sgn(x) * (linscale + log10(|x|) - log10(linthresh))
linthresh - linear threshold, below which absolute value the
function is linear; must be >0linscale - linear scale, being the ratio of the half-extent of
the linear mapped region to the extent of a decade
in the logarithmic region; must be >0x - value to mapCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.