Java Reference
In-Depth Information
Methods (continued)
Method
Introduced
Description
atan(x)
JavaScript 1.0
Returns the arctangent of a number (in radians).
atan2(y, 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.
ceil(x)
JavaScript 1.0
Returns the value of a number rounded up to the nearest
integer.
cos(x)
JavaScript 1.0
Returns the cosine of a number.
exp(x)
JavaScript 1.0
Returns E to the power of the argument passed in.
floor(x)
JavaScript 1.0
Returns the value of a number rounded down to the nearest
integer.
log(x)
JavaScript 1.0
Returns the natural logarithm (base E) of a number.
max(a, b)
JavaScript 1.0
Returns the greater of two numbers passed in as parameters.
min(a, b)
JavaScript 1.0
Returns the lesser of two numbers passed in as parameters.
pow(x, y)
JavaScript 1.0
Returns the fi rst parameter raised to the power of the second.
random()
JavaScript 1.1
Returns a pseudo-random number between 0 and 1.
round(x)
JavaScript 1.0
Returns the value of a number rounded up or down to the
nearest integer.
sin(x)
JavaScript 1.0
Returns the sine of a number.
sqrt(x)
JavaScript 1.0
Returns the square root of a number.
tan(x)
JavaScript 1.0
Returns the tangent of a number.
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.
Properties
Property
Introduced
Description
constructor
JavaScript 1.1
Used to reference the constructor function for the object.
MAX_VALUE
JavaScript 1.1
Returns the largest number that can be represented in
JavaScript (approximately 1.79E+308).
Search WWH ::




Custom Search