Specifications

f - format as [-]9.9
g - use e or f format, whichever is the most concise
G - use E or f format, whichever is the most concise
With 'e', 'E', and 'f', precision is the number of digits after
the decimal point. With 'g' and 'G', precision is the
maximum number of significant digits (trailing zeroes are
omitted).
Math
The Math object, which always exists in a JavaScript program, supports many common
mathematical functions.
with ( Math ) {
var x = PI * 2;
var angle = 1.3;
var y = x * sin( angle );
}
See also built-in contants and built-in functions.
Math Properties
All the Math properties are read-only constants.
Eulers constant. The base for natural logarithms.
E : Number
Natural logarithm of 2.
LN2 : Number
Natural logarithm of 10.
LN10 : Number
Base 2 logarithm of E.
LOG2E : Number
Base 10 logarithm of E.
LOG10E : Number
Pi.
PI : Number
Square root of 1/2.
SQRT1_2 : Number
Square root of 2.
SQRT2 : Number
Math Functions
Returns the absolute value of the given number. The
equivalent of: x = x < 0 ? -x: x;
var x = -99;
abs( number : Number ) : Number
var y = 99;
with ( Math ) {
x = abs( x );
y = abs( y );
}
// x == y
386
Enfocus Switch 10