class_visualscriptmathconstant.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the VisualScriptMathConstant.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_VisualScriptMathConstant:
  6. VisualScriptMathConstant
  7. ========================
  8. **Inherits:** :ref:`VisualScriptNode<class_VisualScriptNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  9. Commonly used mathematical constants.
  10. Description
  11. -----------
  12. Provides common math constants, such as Pi, on an output Data port.
  13. **Input Ports:**
  14. none
  15. **Output Ports:**
  16. - Data (variant): ``get``
  17. Properties
  18. ----------
  19. +-----------------------------------------------------------------+-------------------------------------------------------------------+-------+
  20. | :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` | :ref:`constant<class_VisualScriptMathConstant_property_constant>` | ``0`` |
  21. +-----------------------------------------------------------------+-------------------------------------------------------------------+-------+
  22. Enumerations
  23. ------------
  24. .. _enum_VisualScriptMathConstant_MathConstant:
  25. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_ONE:
  26. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_PI:
  27. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_HALF_PI:
  28. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_TAU:
  29. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_E:
  30. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_SQRT2:
  31. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_INF:
  32. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_NAN:
  33. .. _class_VisualScriptMathConstant_constant_MATH_CONSTANT_MAX:
  34. enum **MathConstant**:
  35. - **MATH_CONSTANT_ONE** = **0** --- Unity: ``1``.
  36. - **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593``.
  37. - **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796``.
  38. - **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185``.
  39. - **MATH_CONSTANT_E** = **4** --- Mathematical constant ``e``, the natural log base: ``2.718282``.
  40. - **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214``.
  41. - **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf``.
  42. - **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan``.
  43. - **MATH_CONSTANT_MAX** = **8** --- Represents the size of the :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` enum.
  44. Property Descriptions
  45. ---------------------
  46. .. _class_VisualScriptMathConstant_property_constant:
  47. - :ref:`MathConstant<enum_VisualScriptMathConstant_MathConstant>` **constant**
  48. +-----------+--------------------------+
  49. | *Default* | ``0`` |
  50. +-----------+--------------------------+
  51. | *Setter* | set_math_constant(value) |
  52. +-----------+--------------------------+
  53. | *Getter* | get_math_constant() |
  54. +-----------+--------------------------+
  55. The math constant.
  56. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  57. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  58. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`