class_vector2i.rst 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the Vector2i.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_Vector2i:
  6. Vector2i
  7. ========
  8. Vector used for 2D math using integer coordinates.
  9. Description
  10. -----------
  11. 2-element structure that can be used to represent positions in 2D space or any other pair of numeric values.
  12. It uses integer coordinates.
  13. Tutorials
  14. ---------
  15. - :doc:`../tutorials/math/index`
  16. Methods
  17. -------
  18. +---------------------------------+--------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_method_Vector2i>` **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)** |
  20. +---------------------------------+--------------------------------------------------------------------------------------------------------------+
  21. | :ref:`Vector2i<class_Vector2i>` | :ref:`Vector2i<class_Vector2i_method_Vector2i>` **(** :ref:`Vector2<class_Vector2>` from **)** |
  22. +---------------------------------+--------------------------------------------------------------------------------------------------------------+
  23. Constants
  24. ---------
  25. .. _class_Vector2i_constant_AXIS_X:
  26. .. _class_Vector2i_constant_AXIS_Y:
  27. .. _class_Vector2i_constant_ZERO:
  28. .. _class_Vector2i_constant_ONE:
  29. .. _class_Vector2i_constant_LEFT:
  30. .. _class_Vector2i_constant_RIGHT:
  31. .. _class_Vector2i_constant_UP:
  32. .. _class_Vector2i_constant_DOWN:
  33. - **AXIS_X** = **0** --- Enumerated value for the X axis.
  34. - **AXIS_Y** = **1** --- Enumerated value for the Y axis.
  35. - **ZERO** = **Vector2i( 0, 0 )** --- Zero vector.
  36. - **ONE** = **Vector2i( 1, 1 )** --- One vector.
  37. - **LEFT** = **Vector2i( -1, 0 )** --- Left unit vector.
  38. - **RIGHT** = **Vector2i( 1, 0 )** --- Right unit vector.
  39. - **UP** = **Vector2i( 0, -1 )** --- Up unit vector.
  40. - **DOWN** = **Vector2i( 0, 1 )** --- Down unit vector.
  41. Method Descriptions
  42. -------------------
  43. .. _class_Vector2i_method_Vector2i:
  44. - :ref:`Vector2i<class_Vector2i>` **Vector2i** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y **)**
  45. Constructs a new ``Vector2i`` from the given ``x`` and ``y``.
  46. ----
  47. - :ref:`Vector2i<class_Vector2i>` **Vector2i** **(** :ref:`Vector2<class_Vector2>` from **)**
  48. Constructs a new ``Vector2i`` from :ref:`Vector2<class_Vector2>`. The floating point coordinates will be truncated.