Child pages
  • Math

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Hidden
DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY, UNLESS YOU KNOW WHAT YOU'RE DOING.		THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO EXTRACT CHANGES FROM THE PAGE AND MERGE THEM BACK INTO SERVOY SOURCE


HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#E
Euler's constant and the base of natural logarithms.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#LN10
Natural logarithm of 10.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#LN2
Natural logarithm of 2.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#LOG10E
Base 10 logarithm of E.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#LOG2E
Base 2 logarithm of E.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#PI
Ratio of the circumference of a circle to its diameter.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#SQRT1_2
Square root of 1/2.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#SQRT2
Square root of 2.

HTML Table
classservoy sSummery
Colgroup Tag
Column
padding0px
width80px

Column

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Summery
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#abs(x)
Returns the absolute value of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#acos(x)
Returns the arccosine (in radians) of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#asin(x)
Returns the arcsine (in radians) of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#atan(x)
Returns the arctangent (in radians) of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#atan2(y, x)
Returns the arctangent of the quotient of its arguments.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#ceil(x)
Returns the smallest integer greater than or equal to a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#cos(x)
Returns the cosine of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#exp(x)
Returns Enumber, where number is the argument, and E is Euler's constant, the base of the natural logarithms.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#floor(x)
Returns the largest integer less than or equal to a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#log(x)
Returns the natural logarithm (base E) of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#max(value1, value2, [valueN])
Returns the greater of two (or more) numbers.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#min(value1, value2, [valueN])
Returns the lesser of two (or more) numbers.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
#pow(base, exponent)
Returns base to the exponent power, that is, base exponent.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#random()
Returns a pseudo-random number between 0 and 1.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#round(x)
Returns the value of a number rounded to the nearest integer.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#sin(x)
Returns the sine of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#sqrt(x)
Returns the square root of a number.
Table Body (tbody)
Table Row (tr)
Table Cell (td)
void
Table Cell (td)
#tan(x)
Returns the tangent of a number.

HTML Table
idproperty
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Property Details
Table Body (tbody)
idE
classnode
Table Row (tr)
idname
Table Cell (td)
E
Table Row (tr)
iddes
Table Cell (td)
Euler's constant and the base of natural logarithms. Approximately 2.718.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.E
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idLN10
classnode
Table Row (tr)
idname
Table Cell (td)
LN10
Table Row (tr)
iddes
Table Cell (td)
Natural logarithm of 10. Approximately 2.302.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.LN10
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idLN2
classnode
Table Row (tr)
idname
Table Cell (td)
LN2
Table Row (tr)
iddes
Table Cell (td)
Natural logarithm of 2. Approximately 0.693.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.LN2
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idLOG10E
classnode
Table Row (tr)
idname
Table Cell (td)
LOG10E
Table Row (tr)
iddes
Table Cell (td)
Base 10 logarithm of E. Approximately 0.434.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.LOG10E
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idLOG2E
classnode
Table Row (tr)
idname
Table Cell (td)
LOG2E
Table Row (tr)
iddes
Table Cell (td)
Base 2 logarithm of E. Approximately 1.442.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.LOG2E
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idPI
classnode
Table Row (tr)
idname
Table Cell (td)
PI
Table Row (tr)
iddes
Table Cell (td)
Ratio of the circumference of a circle to its diameter. Approximately 3.14159.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.PI
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idSQRT1_2
classnode
Table Row (tr)
idname
Table Cell (td)
SQRT1_2
Table Row (tr)
iddes
Table Cell (td)
Square root of 1/2. Equivalently, 1 over the square root of 2, approximately 0.707.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.SQRT1_2
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idSQRT2
classnode
Table Row (tr)
idname
Table Cell (td)
SQRT2
Table Row (tr)
iddes
Table Cell (td)
Square root of 2. Approximately 1.414.
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.SQRT2
Table Row (tr)
classlastDetailRow
Table Cell (td)


HTML Table
idfunction
classservoy sDetail
Colgroup Tag
Column
padding0px
width100%

Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan1
Method Details
Table Body (tbody)
idabs
classnode
Table Row (tr)
idname
Table Cell (td)
abs
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
abs
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the absolute value of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.abs(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idacos
classnode
Table Row (tr)
idname
Table Cell (td)
acos
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
acos
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the arccosine (in radians) of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.acos(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idasin
classnode
Table Row (tr)
idname
Table Cell (td)
asin
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
asin
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the arcsine (in radians) of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.asin(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idatan
classnode
Table Row (tr)
idname
Table Cell (td)
atan
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
atan
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the arctangent (in radians) of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.atan(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idatan2
classnode
Table Row (tr)
idname
Table Cell (td)
atan2
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
atan2
Span
stylefloat: left;
idiets
(y, x)
Table Row (tr)
iddes
Table Cell (td)
Returns the arctangent of the quotient of its arguments.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} y
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.atan2(number,number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idceil
classnode
Table Row (tr)
idname
Table Cell (td)
ceil
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
ceil
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the smallest integer greater than or equal to a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.ceil(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idcos
classnode
Table Row (tr)
idname
Table Cell (td)
cos
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
cos
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the cosine of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.cos(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idexp
classnode
Table Row (tr)
idname
Table Cell (td)
exp
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
exp
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns Enumber, where number is the argument, and E is Euler's constant, the base of the natural logarithms.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.exp(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idfloor
classnode
Table Row (tr)
idname
Table Cell (td)
floor
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
floor
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the largest integer less than or equal to a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.floor(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idlog
classnode
Table Row (tr)
idname
Table Cell (td)
log
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
log
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the natural logarithm (base E) of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.log(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idmax
classnode
Table Row (tr)
idname
Table Cell (td)
max
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
max
Span
stylefloat: left;
idiets
(value1, value2, [valueN])
Table Row (tr)
iddes
Table Cell (td)
Returns the greater of two (or more) numbers.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} value1
{Number} value2
{Number} [valueN]
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.max(number,number[,number])
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idmin
classnode
Table Row (tr)
idname
Table Cell (td)
min
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
min
Span
stylefloat: left;
idiets
(value1, value2, [valueN])
Table Row (tr)
iddes
Table Cell (td)
Returns the lesser of two (or more) numbers.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} value1
{Number} value2
{Number} [valueN]
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.min(number,number[,number])
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idpow
classnode
Table Row (tr)
idname
Table Cell (td)
pow
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
Number
Span
stylefloat: left; font-weight: bold;
idiets
pow
Span
stylefloat: left;
idiets
(base, exponent)
Table Row (tr)
iddes
Table Cell (td)
Returns base to the exponent power, that is, base exponent.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} base
{Number} exponent
Table Row (tr)
idret
Table Cell (td)
Returns
Number
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.pow(number,number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idrandom
classnode
Table Row (tr)
idname
Table Cell (td)
random
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
random
Span
stylefloat: left;
idiets
()
Table Row (tr)
iddes
Table Cell (td)
Returns a pseudo-random number between 0 and 1.
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.random()
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idround
classnode
Table Row (tr)
idname
Table Cell (td)
round
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
round
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the value of a number rounded to the nearest integer.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.round(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsin
classnode
Table Row (tr)
idname
Table Cell (td)
sin
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
sin
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the sine of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.sin(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idsqrt
classnode
Table Row (tr)
idname
Table Cell (td)
sqrt
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
sqrt
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the square root of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.sqrt(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)

Table Body (tbody)
idtan
classnode
Table Row (tr)
idname
Table Cell (td)
tan
Table Row (tr)
idsig
Table Cell (td)
Span
stylefloat: left; margin-right: 5px;
void
Span
stylefloat: left; font-weight: bold;
idiets
tan
Span
stylefloat: left;
idiets
(x)
Table Row (tr)
iddes
Table Cell (td)
Returns the tangent of a number.
Table Row (tr)
idprs
Table Cell (td)
Parameters
{Number} x
Table Row (tr)
idret
Table Cell (td)
Returns
void
Table Row (tr)
idsam
Table Cell (td)
Sample
Div
classsIndent
Code Block
languagejavascript
Math.tan(number)
Table Row (tr)
classlastDetailRow
Table Cell (td)