Java Reference
In-Depth Information
Methods
Method
introduced
description
JavaScript 1.0
Returns the absolute (positive) value of a number.
abs(x)
JavaScript 1.0
Returns the arccosine of a number (in radians).
acos(x)
JavaScript 1.0
Returns the arcsine of a number (in radians).
asin(x)
JavaScript 1.0
Returns the arctangent of a number (in radians).
atan(x)
JavaScript 1.0
Returns the angle (in radians) between the x‐axis and the
position represented by the y and x coordinates passed in
as parameters.
atan2(y, x)
JavaScript 1.0
Returns the value of a number rounded up to the nearest
integer.
ceil(x)
JavaScript 1.0
Returns the cosine of a number.
cos(x)
JavaScript 1.0
Returns E to the power of the argument passed in.
exp(x)
JavaScript 1.0
Returns the value of a number rounded down to the
nearest integer.
floor(x)
JavaScript 1.0
Returns the natural logarithm (base E) of a number.
log(x)
JavaScript 1.0
Returns the greater of two numbers passed in as
parameters.
max(a, b)
JavaScript 1.0
Returns the lesser of two numbers passed in as parameters.
min(a, b)
JavaScript 1.0
Returns the first parameter raised to the power of the
second.
pow(x, y)
JavaScript 1.1
Returns a pseudo‐random number between 0 and 1.
random()
JavaScript 1.0
Returns the value of a number rounded up or down to the
nearest integer.
round(x)
JavaScript 1.0
Returns the sine of a number.
sin(x)
JavaScript 1.0
Returns the square root of a number.
sqrt(x)
JavaScript 1.0
Returns the tangent of a number.
tan(x)
number
The Number object acts as a wrapper for primitive numeric values. Introduced in JavaScript 1.1, a
Number object is created using the Number constructor with the initial value for the number passed
in as a parameter.
Search WWH ::




Custom Search