Files
pybricks-api/doc/main/micropython/umath.rst
T
Laurens Valk 238204d280 doc/main: Rename from doc/api.
The doc/api is a legacy name, which is confusing in the current use, since all build targets are now APIs.

Today we have:

doc/common: Common configuration and settings between all targets.

doc/main: Main Pybricks documentation at docs.pybricks.com.

doc/ide: Documentation shipped with the Pybricks Code IDE.
2021-07-14 11:39:20 +02:00

78 lines
1.3 KiB
ReStructuredText

:mod:`umath <umath>` -- Math functions
============================================================
This module is available on the the City Hub, Technic Hub,
Prime Hub, and Inventor Hub.
This MicroPython module is similar to the `math module`_ in Python.
.. module:: umath
Rounding and sign
-------------------------------------
.. autofunction:: umath.ceil
.. autofunction:: umath.floor
.. autofunction:: umath.trunc
.. autofunction:: umath.fmod
.. autofunction:: umath.fabs
.. autofunction:: umath.copysign
Powers and logarithms
-------------------------------
.. autodata:: umath.e
.. autofunction:: umath.exp
.. autofunction:: umath.pow
.. autofunction:: umath.log
.. autofunction:: umath.sqrt
Trigonomety
-------------------------------
.. autodata:: umath.pi
.. autofunction:: umath.degrees
.. autofunction:: umath.radians
.. autofunction:: umath.sin
.. autofunction:: umath.asin
.. autofunction:: umath.cos
.. autofunction:: umath.acos
.. autofunction:: umath.tan
.. autofunction:: umath.atan
.. autofunction:: umath.atan2
Other math functions
-------------------------------
.. autofunction:: umath.isfinite
.. autofunction:: umath.isinfinite
.. autofunction:: umath.isnan
.. autofunction:: umath.modf
.. autofunction:: umath.frexp
.. autofunction:: umath.ldexp
.. _math module: https://docs.python.org/3.5/library/math.html#module-math