| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/Math | [Back] [Original] |
Get to know MDN better
Math
Math new Math Math
:
Math
JavaScript OS
Math.E () 2.718
Math.LN1010 2.303
Math.LN22 0.693
Math.LOG10E10 E 0.434
Math.LOG2E2 E 1.443
Math.PI 3.14159
Math.SQRT1_2 ( 1/2 ) 0.707
Math.SQRT22 1.414
Math[Symbol.toStringTag]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
function degToRad(degrees) {
return degrees * (Math.PI / 180);
}
function radToDeg(rad) {
return rad / (Math.PI / 180);
}
100
JavaScript
50 * Math.tan(degToRad(60));
degToRad() 60 Math.tan()
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 |