@JsType(isNative=true,
name="Math",
namespace="<global>")
@Generated(value="org.realityforge.webtack")
public final class JsMath
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static double |
E
The Math.E property represents Euler's number, the base of natural logarithms, e, which is approximately 2.718.
|
static double |
LN10
The Math.LN10 property represents the natural logarithm of 10, approximately 2.302:
|
static double |
LN2
The Math.LN2 property represents the natural logarithm of 2, approximately 0.693:
|
static double |
LOG10E
The Math.LOG10E property represents the base 10 logarithm of e, approximately 0.434:
|
static double |
LOG2E
The Math.LOG2E property represents the base 2 logarithm of e, approximately 1.442:
|
static double |
PI
The Math.PI property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159:
|
static double |
SQRT1_2
The Math.SQRT1_2 property represents the square root of 1/2 which is approximately 0.707:
|
static double |
SQRT2
The Math.SQRT2 property represents the square root of 2, approximately 1.414:
|
| Modifier and Type | Method and Description |
|---|---|
static double |
abs(double x)
The Math.abs() function returns the absolute value of a number.
|
static double |
acos(double x)
The Math.acos() function returns the arccosine (in radians) of a number, that is
|
static double |
acosh(double x)
The Math.acosh() function returns the hyperbolic arc-cosine of a number, that is
|
static double |
asin(double x)
The Math.asin() function returns the arcsine (in radians) of a number, that is
|
static double |
asinh(double x)
The Math.asinh() function returns the hyperbolic arcsine of a number, that is
|
static double |
atan(double x)
The Math.atan() function returns the arctangent (in radians) of a number, that is
|
static double |
atan2(double y,
double x)
The Math.atan2() function returns the angle in the plane (in radians) between the positive x-axis and the ray from (0,0) to the point (x,y), for Math.atan2(y,x).
|
static double |
atanh(double x)
The Math.atanh() function returns the hyperbolic arctangent of a number, that is
|
static double |
cbrt(double x)
The Math.cbrt() function returns the cube root of a number, that is
|
static int |
ceil(double x)
The Math.ceil() function always rounds a number up to the next largest integer.
|
static int |
clz32(int x)
The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number.
|
static double |
cos(double x)
The Math.cos() static function returns the cosine of the specified angle, which must be specified in radians.
|
static double |
cosh(double x)
The Math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e:
|
static double |
exp(double x)
The Math.exp() function returns e^x, where x is the argument, and e is Euler's number (also known as Napier's constant), the base of the natural logarithms.
|
static double |
expm1(double x)
The Math.expm1() function returns e^x - 1, where x is the argument, and e the base of the natural logarithms.
|
static int |
floor(double x)
The Math.floor() function returns the largest integer less than or equal to a given number.
|
static float |
fround(double x)
The Math.fround() function returns the nearest 32-bit single precision float representation of a Number.
|
static double |
hypot(double... value)
The Math.hypot() function returns the square root of the sum of squares of its arguments, that is:
|
static double |
imul(double... value)
The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.
|
static int |
imul(int value1,
int value2)
The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.
|
static double |
log(double x)
The Math.log() function returns the natural logarithm (base e) of a number, that is
|
static double |
log10(double x)
The Math.log10() function returns the base 10 logarithm of a number, that is
|
static double |
log1p(double x)
The Math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is
|
static double |
log2(double x)
The Math.log2() function returns the base 2 logarithm of a number, that is
|
static double |
max(double... values)
The Math.max() function returns the largest of the zero or more numbers given as input parameters, or NaN if any parameter isn't a number and can't be converted into one.
|
static double |
min(double... values)
The static function Math.min() returns the lowest-valued number passed into it, or NaN if any parameter isn't a number and can't be converted into one.
|
static double |
pow(double x,
double y)
The Math.pow() function returns the base to the exponent power, as in base^exponent.
|
static double |
random()
The Math.random() function returns a floating-point, pseudo-random number in the range 0 to less than 1 (inclusive of 0, but not 1) with approximately uniform distribution over that range — which you can then scale to your desired range.
|
static int |
round(double x)
The Math.round() function returns the value of a number rounded to the nearest integer.
|
static double |
sign(double x)
The Math.sign() function returns either a positive or negative +/- 1, indicating the sign of a number passed into the argument.
|
static double |
sin(double x)
The Math.sin() function returns the sine of a number.
|
static double |
sinh(double x)
The Math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e:
|
static double |
sqrt(double x)
The Math.sqrt() function returns the square root of a number, that is
|
static double |
tan(double x)
The Math.tan() function returns the tangent of a number.
|
static double |
tanh(double x)
The Math.tanh() function returns the hyperbolic tangent of a number, that is
|
static int |
trunc(double x)
The Math.trunc() function returns the integer part of a number by removing any fractional digits.
|
@JsOverlay public static final double E
@JsOverlay public static final double LN10
@JsOverlay public static final double LN2
@JsOverlay public static final double LOG10E
@JsOverlay public static final double LOG2E
@JsOverlay public static final double PI
@JsOverlay public static final double SQRT1_2
@JsOverlay public static final double SQRT2
public static double abs(double x)
public static double acos(double x)
public static double acosh(double x)
public static double asin(double x)
public static double asinh(double x)
public static double atan(double x)
public static double atan2(double y,
double x)
public static double atanh(double x)
public static double cbrt(double x)
public static int ceil(double x)
public static int clz32(int x)
public static double cos(double x)
public static double cosh(double x)
public static double exp(double x)
public static double expm1(double x)
public static int floor(double x)
public static float fround(double x)
public static double hypot(double... value)
public static double imul(double... value)
public static int imul(int value1,
int value2)
public static double log(double x)
public static double log10(double x)
public static double log1p(double x)
public static double log2(double x)
public static double max(double... values)
public static double min(double... values)
public static double pow(double x,
double y)
public static double random()
public static int round(double x)
public static double sign(double x)
public static double sin(double x)
public static double sinh(double x)
public static double sqrt(double x)
public static double tan(double x)
public static double tanh(double x)
public static int trunc(double x)