JavaScript Math Functions
CSGNetwork FREE Source Code, Javascript Source, and Code Snippets!
CSGNetwork Custom Search
     Bookmark and Share
 
CSGNetwork
Snippets
Calculators
Top Free Apps
Home
Back



Right click this window and select "view source" in order to copy the source for this script.

JavaScript Math Functions



Math.abs(a)     returns the absolute value of a
Math.acos(a)    returns arc cosine of a
Math.asin(a)    returns arc sine of a
Math.atan(a)    returns arc tangent of a
Math.atan2(a,b) returns arc tangent of a/b
Math.ceil(a)    returns integer closest to a and not less than a
Math.cos(a)     returns cosine of a
Math.exp(a)     returns exponent of a
Math.floor(a)   returns integer closest to and not greater than a
Math.log(a)     returns log of a base e
Math.max(a,b)   returns the maximum of a and b
Math.min(a,b)   returns the minimum of a and b
Math.pow(a,b)   returns a to the power b
Math.random()   returns pseudorandom number in the range 0 to 1
Math.round(a)   returns integer closest to a 
Math.sin(a)     returns sine of a
Math.sqrt(a)    returns square root of a
Math.tan(a)     returns tangent of a


All trig operations are in radians rather than degrees..


Bookmark and Share
Registered® Trademark™ and CopyrightŠ 1973 - CSG, Computer Support Group, Inc. and CSGNetwork.Com All Rights Reserved