Math Object
-
Unlike other objects, you do not need to create a new instance of the Math
object. It is present automatically, it is static.
-
Has mathematical constants, methods.
-
Rounding Functions:
-
Math.ceil(argument) rounds to next highest integer
-
Math.floor(argument) rounds to next lowest integer
-
Math.round(argument) rounds to nearest integer
-
How do you round to a decimal place?
-
Random Number
-
Math.random() generates a random number between 0 and 1.
Example: math.html
More Math Stuff
Home
Internet II: Day 3