Files
godot-docs/classes/class_visualscriptmathconstant.rst
2018-10-25 15:18:07 +02:00

79 lines
2.1 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the VisualScriptMathConstant.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_VisualScriptMathConstant:
VisualScriptMathConstant
========================
**Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
**Category:** Core
Brief Description
-----------------
Commonly used mathematical constants.
Properties
----------
+-----------------------------------------------------------------+----------------------------------------------------------+
| :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` | :ref:`constant<class_VisualScriptMathConstant_constant>` |
+-----------------------------------------------------------------+----------------------------------------------------------+
Enumerations
------------
.. _enum_VisualScriptMathConstant_MathConstant:
enum **MathConstant**:
- **MATH_CONSTANT_ONE** = **0** --- Unity: ``1``
- **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593``
- **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796``
- **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185``
- **MATH_CONSTANT_E** = **4** --- Mathematical constant ``e``, the natural log base: ``2.718282``
- **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214``
- **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf``
- **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan``
- **MATH_CONSTANT_MAX** = **8**
Description
-----------
Provides common math constants, such as Pi, on an output Data port.
**Input Ports:**
none
**Output Ports:**
- Data (variant): ``get``
Property Descriptions
---------------------
.. _class_VisualScriptMathConstant_constant:
- :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` **constant**
+----------+--------------------------+
| *Setter* | set_math_constant(value) |
+----------+--------------------------+
| *Getter* | get_math_constant() |
+----------+--------------------------+
The math constant.