Math functions : Math « Javascript Objects « JavaScript DHTML






Math functions

    
Math                  Description Methods 
abs(x)                Returns the absolute value of x. 
acos(x)               Returns the arc cosine of x in radians. 
asin(x)               Returns the arc sine of x in radians. 
atan(x)               Returns the arc tangent of x in radians. 
atan2(y,x)            Returns the arc tangent of the quotient of its Arguments, that is, y/x. 
ceil(x)               Returns the smallest integer greater than or equal to x. 
cos(x)                Returns the cosine of x. 
exp(x)                Returns ex, where x is the Argument and e is Euler's constant. 
floor(x)              Returns the largest integer less than or equal to x. 
log(x)                Returns the natural logarithm (base E) of x. 
max(x,y)              Returns the greater of the two numbers x and y. 
min(x,y)              Returns the lesser of the two numbers x and y. 
pow(x,y)              Returns xy, traditionally base to the exponent power, that is, baseexponent. 
random()              Returns a pseudo-random number between 0 and 1. 
round(x)              Returns the value of x rounded to the nearest integer with .50 as cutoff. 
sin(x)                Returns the sine of x. 
sqrt(x)               Returns the square root of x. 
tan(x)                Returns the tangent of x. 

   
    
    
    
  








Related examples in the same category

1.'abs()' Example
2.'acos()' Example
3.'asin()' Example
4.'atan()' Example
5.'atan2()' Example
6.'ceil()' Example
7.'cos()' Example
8.'E' Example
9.'exp()' Example
10.'floor()' Example
11.'isNaN()' Example
12.'LN10' Example
13.'LN2' Example
14.'log()' Example
15.'LOG10E' Example
16.'LOG2E' Example
17.'max()' Example
18.'MAX_VALUE' Example
19.'min()' Example
20.'MIN_VALUE' Example
21.'NEGATIVE_INFINITY' Example
22.'parseFloat()' Example
23.'parseInt()' Example
24.'PI' Example
25.'POSITIVE_INFINITY' Example
26.'pow()' Example
27.'round()' Example
28.'sin()' Example
29.'sqrt()' Example
30.'SQRT1_2' Example
31.'SQRT2' Example
32.'tan()' Example