Math has a set of properties(built in constants) including
|
E LN10 LN2 PI SQRT1_2 SQRT2 so that
|
Math.PI = 3.14159 etc.
|
Math methods include the usual ones in Fortran Intrinsic library with examples
|
Math.random() returns pseudo random number between 0 and 1
|
Math.abs(x) returns absolute value of x
|
Math.max(x1,x2) returns maximum of two numbers x1 and x2
|
Math.cos(x) returns cosine of argument x in radians
|
Math.round(x) rounds x to nearest positive or negative integer
|
The Number object has properties defining system dependent constants such as:
-
Number.MAX_VALUE is Largest representable number on your machine
-
Number.NaN represents "Not a Number" used by parseInt and parseFloat
|