.. _Math: ================================================ Math ================================================ Description ----------- A global object containing a set of math functions and constants. Static Properties ^^^^^^^^^^^^^^^^^ +---------------------------------------+-------------------------------------------------------------+ | :ref:`E` readonly | Euler's constant and the base of natural logarithms. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`LN10` readonly | The natural logarithm of 10. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`LN2` readonly | The natural logarithm of 2. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`LOG10E` readonly | The base 10 logarithm of e. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`LOG2E` readonly | The base 2 logarithm of e. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`PI` readonly | The ratio of the circumference of a circle to its diameter. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`SQRT1_2` readonly | The reciprocal of the square root of 1/2. | +---------------------------------------+-------------------------------------------------------------+ | :ref:`SQRT2` readonly | The square root of 2. | +---------------------------------------+-------------------------------------------------------------+ Static Methods ^^^^^^^^^^^^^^ +-------------------------------------+----------------------------------------------------------------------+ | :ref:`abs` readonly | Returns the absolute value of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`acos` readonly | Returns the arc cosine(in radians) of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`asin` readonly | Returns the arc sin(in radians) of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`atan` readonly | Returns the arc tangent(in radians) of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`atan2` readonly | Returns the arc tangent of the quotient of its arguments (y/x). | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`ceil` readonly | Rounds the number up to the nearest integer. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`cos` readonly | Returns the cosine of an angle provided in radians. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`exp` readonly | Returns Math.E raised to the power of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`floor` readonly | Rounds a number down to the nearest integer. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`log` readonly | Returns the natural logarithm of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`max` readonly | Returns the largest of zero or more numbers. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`min` readonly | Returns the smallest of zero or more numbers. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`pow` readonly | Returns x raised to the power of y. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`random` readonly | Returns a pseudo-random number from 0.0 up to but not including 1.0. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`round` readonly | Rounds a number to the nearest integer. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`sin` readonly | Returns the sine of an angle provided in radians. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`sqrt` readonly | Returns the square root of a number. | +-------------------------------------+----------------------------------------------------------------------+ | :ref:`tan` readonly | Returns the tangent of an angle provided in radians. | +-------------------------------------+----------------------------------------------------------------------+ .. container:: hide .. toctree:: :hidden: :maxdepth: 1 Math/E.rst Math/LN10.rst Math/LN2.rst Math/LOG2E.rst Math/LOG10E.rst Math/PI.rst Math/SQRT1_2.rst Math/SQRT2.rst Math/abs.rst Math/acos.rst Math/asin.rst Math/atan.rst Math/atan2.rst Math/ceil.rst Math/cos.rst Math/exp.rst Math/floor.rst Math/log.rst Math/max.rst Math/min.rst Math/pow.rst Math/random.rst Math/round.rst Math/sin.rst Math/sqrt.rst Math/tan.rst