Mention the mathematical formula what believe that a large number of people will be a face ~o (^▽^) o~ but no way, walk on the code this road is doomed to deal with mathematics, learn bar comrades, refueling O (^▽^) o~
The Math object, which provides a mathematical calculation of the data. As an example:
1 <script type= "Text/javascript" >2 var mypi=3 var myabs=math.abs ( -15); 4 document.write (mypi); 5 document.write (myabs); 6 </script>
Operation Result:
3.14159265358979315
The Math object is an intrinsic object that differs from the Date,string object in that it does not need to be created, and that all its properties and methods can be called directly using Math as an object.
Below I put some properties and methods of the math object, so that I can see later, all of the lessons I learned on the Internet, we are interested to see, MU class network is very good, at least for my help very big O (^▽^) o~
Math Object Properties:
Math Object Method:
PS1: For Math.Round () This method, he follows the same distance +∞ principle, that is, when a number, such as 3.5, his distance from 3 and 4 is the same, then return to the larger one, that is, 4. The same,-3.5, the distance-3 and -4, the larger, is-3.
The Ps2:Math.random () method is to return a random number greater than or equal to 0 but less than 1, excluding 1, which is left closed right, and the same as the interception method of substring ().
Math objects and properties in JS