[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Math [Back]  [Original]

Math - JavaScript | MDN

MDN Web Docs

View in English Always switch to English

Math

Baseline *

20157

*

Math

Math Number BigInt

Math new Math Math

: Math

JavaScript OS

Math.E

() 2.718

Math.LN10

10 2.303

Math.LN2

2 0.693

Math.LOG10E

10 E 0.434

Math.LOG2E

2 E 1.443

Math.PI

3.14159

Math.SQRT1_2

( 1/2 ) 0.707

Math.SQRT2

2 1.414

Math[Symbol.toStringTag]

[Symbol.toStringTag] "Math" Object.prototype.toString()

Math.abs()

Math.acos()

()

Math.acosh()

()

Math.asin()

()

Math.asinh()

()

Math.atan()

()

Math.atan2()

()

Math.atanh()

()

Math.cbrt()

Math.ceil()

x

Math.clz32()

x 2 32 0

Math.cos()

()

Math.cosh()

()

Math.exp()

ex x e 2.718,

Math.expm1()

exp(x) 1

Math.floor()

Math.f16round()

Math.fround()

Math.hypot()

Math.imul()

32

Math.log()

e

Math.log10()

10 (log10)

Math.log1p()

1 + x e

Math.log2()

2 (log2)

Math.max()

Math.min()

Math.pow()

x y xy

Math.random()

0 1

Math.round()

x

Math.sign()

x 0

Math.sin()

()

Math.sinh()

()

Math.sqrt()

Math.sumPrecise()

Math.tan()

()

Math.tanh()

()

Math.trunc()

(sin(), cos(), tan(), asin(), acos(), atan(), atan2())

CSS

js
function degToRad(degrees) {
  return degrees * (Math.PI / 180);
}

function radToDeg(rad) {
  return rad / (Math.PI / 180);
}

100

 1 3 60 [ 1 3 60 ]

JavaScript

js
50 * Math.tan(degToRad(60));

degToRad() 60 Math.tan()

2

Math.random() Math.floor()

js
function random(min, max) {
  const num = Math.floor(Math.random() * (max - min + 1)) + min;
  return num;
}

random(1, 10);

ECMAScript 2027 LanguageSpecification
# sec-math-object


Web Proxy Viewer  |  New URL  |  Original Page