@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Math")
public final class JsMathNamespace
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 |
|---|---|
double |
abs(double x)
The Math.abs() function returns the absolute value of a number
|
double |
acos(double x)
The Math.acos() function returns the arccosine (in radians) of a number, that is
|
double |
acosh(double x)
The Math.acosh() function returns the hyperbolic arc-cosine of a number, that is
|
double |
asin(double x)
The Math.asin() function returns the arcsine (in radians) of a number, that is
|
double |
asinh(double x)
The Math.asinh() function returns the hyperbolic arcsine of a number, that is
|
double |
atan(double x)
The Math.atan() function returns the arctangent (in radians) of a number, that is
|
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).
|
double |
atanh(double x)
The Math.atanh() function returns the hyperbolic arctangent of a number, that is
|
double |
cbrt(double x)
The Math.cbrt() function returns the cube root of a number, that is
|
int |
ceil(double x)
The Math.ceil() function always rounds a number up to the next largest integer.
|
int |
clz32(int x)
The Math.clz32() function returns the number of leading zero bits in the 32-bit binary representation of a number.
|
double |
cos(double x)
The Math.cos() static function returns the cosine of the specified angle, which must be specified in radians.
|
double |
cosh(double x)
The Math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e:
|
double |
exp(double x)
The Math.exp() function returns ex, where x is the argument, and e is Euler's number (also known as Napier's constant), the base of the natural logarithms.
|
double |
expm1(double x)
The Math.expm1() function returns ex - 1, where x is the argument, and e the base of the natural logarithms.
|
int |
floor(double x)
The Math.floor() function returns the largest integer less than or equal to a given number.
|
float |
fround(double x)
The Math.fround() function returns the nearest 32-bit single precision float representation of a Number.
|
double |
hypot(double... value)
The Math.hypot() function returns the square root of the sum of squares of its arguments, that is:
|
double |
imul(double... value)
The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.
|
int |
imul(int value1,
int value2)
The Math.imul() function returns the result of the C-like 32-bit multiplication of the two parameters.
|
double |
log(double x)
The Math.log() function returns the natural logarithm (base e) of a number, that is
|
double |
log10(double x)
The Math.log10() function returns the base 10 logarithm of a number, that is
|
double |
log1p(double x)
The Math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is
|
double |
log2(double x)
The Math.log2() function returns the base 2 logarithm of a number, that is
|
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.
|
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.
|
double |
pow(double x,
double y)
The Math.pow() function returns the base to the exponent power, that is, baseexponent.
|
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.
|
int |
round(double x)
The Math.round() function returns the value of a number rounded to the nearest integer.
|
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.
|
double |
sin(double x)
The Math.sin() function returns the sine of a number.
|
double |
sinh(double x)
The Math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e:
|
double |
sqrt(double x)
The Math.sqrt() function returns the square root of a number, that is
|
double |
tan(double x)
The Math.tan() function returns the tangent of a number.
|
double |
tanh(double x)
The Math.tanh() function returns the hyperbolic tangent of a number, that is
|
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 double abs(double x)
public double acos(double x)
public double acosh(double x)
public double asin(double x)
public double asinh(double x)
public double atan(double x)
public double atan2(double y,
double x)
public double atanh(double x)
public double cbrt(double x)
public int ceil(double x)
public int clz32(int x)
public double cos(double x)
public double cosh(double x)
public double exp(double x)
public double expm1(double x)
public int floor(double x)
public float fround(double x)
public double hypot(double... value)
public double imul(double... value)
public int imul(int value1,
int value2)
public double log(double x)
public double log10(double x)
public double log1p(double x)
public double log2(double x)
public double max(double... values)
public double min(double... values)
public double pow(double x,
double y)
public double random()
public int round(double x)
public double sign(double x)
public double sin(double x)
public double sinh(double x)
public double sqrt(double x)
public double tan(double x)
public double tanh(double x)
public int trunc(double x)