Math API Flashcards
Math.ceil(x)
Returns the smallest integer greater than or equal to a number
Returns the largest integer less than or equal to a number
Math.floor(x)
Math.cos(x)
Returns the cosine of a number
Math.exp(x)
Returns Ex, where x is the argument, and E is Euler’s constant, the base of the natural logarithms
Returns the value of a number rounded to the nearest integer
Math.round(x)
Math.sqrt(x)
Returns the square root (x\sqrt{x}) of a number
Returns the absolute value of a number
Math.abs(x)
Returns the tangent of a number
Math.tan(x)
Returns the smallest of zero or more numbers
Math.min([value1[,value2, …]])
Returns the sine of a number
Math.sin(x)
Returns Ex, where x is the argument, and E is Euler’s constant, the base of the natural logarithms
Math.exp(x)
Math.random()
Returns a floating-point, pseudo-random number in the range [0, 1) that is, from 0 (inclusive) up to but not including 1 (exclusive), which you can then scale to your desired range
Math.max([value1[,value2, …]])
Returns the largest of zero or more numbers
Math.floor(x)
Returns the largest integer less than or equal to a number
Math.pow(base, exponent)
Returns the base to the exponent Power, that is, baseexponent