15 Js Math Library

Библиотека Math в JavaScript #

JS предоставляет часто требуемые математические константы и методы. Ознакомиться со всеми ими можно тут

Но давайте рассмотрим парочку из них:

Math.PI #

Math.abs(x) #

Math.sqrt(x) #

Math.cbrt(x) #

Math.cos(x) #

Math.sin(x) #

Math.tan(x) #

Math.log(x) #

Math.log10(x) #

Math.log2(x) #

Math.ceil(x) #

Math.floor(x) #

Math.round(x) #

Math.random() #

Math.max([x[, y[, …]]]) #

Math.min([x[, y[, …]]]) #

Math.pow(x, y) #

Math.trunc() !!!!! #

comments powered by Disqus