class_visualscriptmathconstant.rst 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. Member Functions
  13. ----------------
  14. +------------------------+--------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`int<class_int>` | :ref:`get_math_constant<class_VisualScriptMathConstant_get_math_constant>` **(** **)** |
  16. +------------------------+--------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_math_constant<class_VisualScriptMathConstant_set_math_constant>` **(** :ref:`int<class_int>` which **)** |
  18. +------------------------+--------------------------------------------------------------------------------------------------------------------+
  19. Member Variables
  20. ----------------
  21. .. _class_VisualScriptMathConstant_constant:
  22. - :ref:`int<class_int>` **constant** - The math constant.
  23. Numeric Constants
  24. -----------------
  25. - **MATH_CONSTANT_ONE** = **0** --- Unity: ``1``
  26. - **MATH_CONSTANT_PI** = **1** --- Pi: ``3.141593``
  27. - **MATH_CONSTANT_HALF_PI** = **2** --- Pi divided by two: ``1.570796``
  28. - **MATH_CONSTANT_TAU** = **3** --- Tau: ``6.283185``
  29. - **MATH_CONSTANT_E** = **4** --- Natural log: ``2.718282``
  30. - **MATH_CONSTANT_SQRT2** = **5** --- Square root of two: ``1.414214``
  31. - **MATH_CONSTANT_INF** = **6** --- Infinity: ``inf``
  32. - **MATH_CONSTANT_NAN** = **7** --- Not a number: ``nan``
  33. - **MATH_CONSTANT_MAX** = **8**
  34. Description
  35. -----------
  36. Provides common math constants, such as Pi or Euler's constant, on an output Data port.
  37. **Input Ports:**
  38. none
  39. **Output Ports:**
  40. - Data (variant): ``get``
  41. Member Function Description
  42. ---------------------------
  43. .. _class_VisualScriptMathConstant_get_math_constant:
  44. - :ref:`int<class_int>` **get_math_constant** **(** **)**
  45. .. _class_VisualScriptMathConstant_set_math_constant:
  46. - void **set_math_constant** **(** :ref:`int<class_int>` which **)**