Thread: java
View Single Post
  #4 (permalink)  
Old 02-19-2008, 02:24 AM
sureshbb sureshbb is offline
D-Web Sr.Programmer
 
Join Date: Aug 2007
Posts: 149
sureshbb is on a distinguished road
Default Re: java

What's Math Constants and Functions using JavaScript?

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
Reply With Quote