JavaScript syntax: Difference between revisions

Content deleted Content added
Line 457:
!Property!!Returned value<br />rounded to 5 digits!!Description
|-
| <tt>Math.E</tt> || align=center|2.7183 || ''[[e (mathematical constant)|{{mvar|e}}]]'': Natural logarithm base
|-
| <tt>Math.LN2</tt> || align=center|0.69315 || [[Natural logarithm]] of 2
Line 463:
| <tt>Math.LN10</tt> || align=center|2.3026 || Natural logarithm of 10
|-
| <tt>Math.LOG2E</tt> || align=center|1.4427 || [[Logarithm]] to the base 2 of ''{{mvar|e''}}
|-
| <tt>Math.LOG10E</tt> || align=center|0.43429 || Logarithm to the base 10 of ''{{mvar|e''}}
|-
| <tt>Math.PI</tt> || align=center|3.14159 || [[Pi|{{pi}}]]: circumference/diameter of a circle
Line 493:
| <tt>Math.cos(Math.PI/4)</tt><tt></tt> || align=center|0.70711 || [[Trigonometric functions#cosine|Cosine]]
|-
| <tt>Math.exp</tt>(1) || align=center|2.7183 || [[Exponential function]]: ''{{mvar|e''}} raised to this power
|-
| <tt>Math.floor(1.9)</tt> || align=center|1 || Floor: round down to largest integer ≤ argument
|-
| <tt>Math.log(Math.E)</tt> || align=center|1 || Natural logarithm, base ''{{mvar|e''}}
|-
| <tt>Math.max(1, -2)</tt> || align=center|1 || Maximum: <tt>(x > y) ? x : y</tt>