class_visualscriptmathconstant.rst 3.7 KB

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