class_visualscriptmathconstant.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the VisualScriptMathConstant.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_VisualScriptMathConstant:
  5. VisualScriptMathConstant
  6. ========================
  7. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Commonly used mathematical constants.
  12. Properties
  13. ----------
  14. +-----------------------------------------------------------------+----------------------------------------------------------+
  15. | :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` | :ref:`constant<class_VisualScriptMathConstant_constant>` |
  16. +-----------------------------------------------------------------+----------------------------------------------------------+
  17. Enumerations
  18. ------------
  19. .. _enum_VisualScriptMathConstant_MathConstant:
  20. enum **MathConstant**:
  21. - **MATH_CONSTANT_ONE** = **0** --- Unity: ``1``
  22. - **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593``
  23. - **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796``
  24. - **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185``
  25. - **MATH_CONSTANT_E** = **4** --- Mathematical constant ``e``, the natural log base: ``2.718282``
  26. - **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214``
  27. - **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf``
  28. - **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan``
  29. - **MATH_CONSTANT_MAX** = **8**
  30. Description
  31. -----------
  32. Provides common math constants, such as Pi, on an output Data port.
  33. **Input Ports:**
  34. none
  35. **Output Ports:**
  36. - Data (variant): ``get``
  37. Property Descriptions
  38. ---------------------
  39. .. _class_VisualScriptMathConstant_constant:
  40. - :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` **constant**
  41. +----------+--------------------------+
  42. | *Setter* | set_math_constant(value) |
  43. +----------+--------------------------+
  44. | *Getter* | get_math_constant() |
  45. +----------+--------------------------+
  46. The math constant.