Forum : What's Math Constants and Functions using JavaScript?
Brief description  about Online courses   join in Online courses
View Abhijit  Paul 's Profile

What's Math Constants and Functions using JavaScript?

What's Math Constants and Functions using JavaScript?
Asked by Abhijit Paul | Mar 22, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Abhijit,
The Math object contains useful constants such as Math.PI, Math.E
Math also has a zillion helpful functions.
Math.abs(value); //absolute value
Math.max(value1, value2); //find the largest
Math.random() //generate a decimal number between 0 and 1
Math.floor(Math.random()*101) //generate a decimal number between 0 and 100
Mar 22, 2010