obs-studio/docs/sphinx/reference-libobs-graphics-math.rst

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
707 B
ReStructuredText
Raw Normal View History

2017-10-25 17:52:58 +00:00
Extra Math Functions/Macros
===========================
.. code:: cpp
2017-10-25 17:52:58 +00:00
#include <graphics/math-extra.h>
Helper functions/macros for graphics math.
2023-06-27 13:53:28 +00:00
.. macro:: RAD(val)
2017-10-25 17:52:58 +00:00
Macro that converts a floating point degrees value to radians.
2023-06-27 13:53:28 +00:00
.. macro:: DEG(val)
2017-10-25 17:52:58 +00:00
Macro that converts a floating point radians value to degrees.
**LARGE_EPSILON** 1e-2f
Large epsilon value.
**EPSILON** 1e-4f
Epsilon value.
**TINY_EPSILON** 1e-5f
Tiny Epsilon value.
**M_INFINITE** 3.4e38f
Infinite value
---------------------
.. function:: float rand_float(int positive_only)
Generates a random floating point value (from -1.0f..1.0f, or
0.0f..1.0f if *positive_only* is set).