mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
classref: Sync with current master branch (705b7a0)
This commit is contained in:
@@ -171,7 +171,7 @@ Constants
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**AXIS_X** = ``0``
|
||||
**AXIS_X** = ``0`` :ref:`🔗<class_Vector2i_constant_AXIS_X>`
|
||||
|
||||
Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector2i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector2i_method_min_axis_index>`.
|
||||
|
||||
@@ -179,7 +179,7 @@ Enumerated value for the X axis. Returned by :ref:`max_axis_index<class_Vector2i
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**AXIS_Y** = ``1``
|
||||
**AXIS_Y** = ``1`` :ref:`🔗<class_Vector2i_constant_AXIS_Y>`
|
||||
|
||||
Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector2i_method_max_axis_index>` and :ref:`min_axis_index<class_Vector2i_method_min_axis_index>`.
|
||||
|
||||
@@ -187,7 +187,7 @@ Enumerated value for the Y axis. Returned by :ref:`max_axis_index<class_Vector2i
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**ZERO** = ``Vector2i(0, 0)``
|
||||
**ZERO** = ``Vector2i(0, 0)`` :ref:`🔗<class_Vector2i_constant_ZERO>`
|
||||
|
||||
Zero vector, a vector with all components set to ``0``.
|
||||
|
||||
@@ -195,7 +195,7 @@ Zero vector, a vector with all components set to ``0``.
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**ONE** = ``Vector2i(1, 1)``
|
||||
**ONE** = ``Vector2i(1, 1)`` :ref:`🔗<class_Vector2i_constant_ONE>`
|
||||
|
||||
One vector, a vector with all components set to ``1``.
|
||||
|
||||
@@ -203,7 +203,7 @@ One vector, a vector with all components set to ``1``.
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**MIN** = ``Vector2i(-2147483648, -2147483648)``
|
||||
**MIN** = ``Vector2i(-2147483648, -2147483648)`` :ref:`🔗<class_Vector2i_constant_MIN>`
|
||||
|
||||
Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as a negative integer equivalent of :ref:`Vector2.INF<class_Vector2_constant_INF>`.
|
||||
|
||||
@@ -211,7 +211,7 @@ Min vector, a vector with all components equal to ``INT32_MIN``. Can be used as
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**MAX** = ``Vector2i(2147483647, 2147483647)``
|
||||
**MAX** = ``Vector2i(2147483647, 2147483647)`` :ref:`🔗<class_Vector2i_constant_MAX>`
|
||||
|
||||
Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as an integer equivalent of :ref:`Vector2.INF<class_Vector2_constant_INF>`.
|
||||
|
||||
@@ -219,7 +219,7 @@ Max vector, a vector with all components equal to ``INT32_MAX``. Can be used as
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**LEFT** = ``Vector2i(-1, 0)``
|
||||
**LEFT** = ``Vector2i(-1, 0)`` :ref:`🔗<class_Vector2i_constant_LEFT>`
|
||||
|
||||
Left unit vector. Represents the direction of left.
|
||||
|
||||
@@ -227,7 +227,7 @@ Left unit vector. Represents the direction of left.
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**RIGHT** = ``Vector2i(1, 0)``
|
||||
**RIGHT** = ``Vector2i(1, 0)`` :ref:`🔗<class_Vector2i_constant_RIGHT>`
|
||||
|
||||
Right unit vector. Represents the direction of right.
|
||||
|
||||
@@ -235,7 +235,7 @@ Right unit vector. Represents the direction of right.
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**UP** = ``Vector2i(0, -1)``
|
||||
**UP** = ``Vector2i(0, -1)`` :ref:`🔗<class_Vector2i_constant_UP>`
|
||||
|
||||
Up unit vector. Y is down in 2D, so this vector points -Y.
|
||||
|
||||
@@ -243,7 +243,7 @@ Up unit vector. Y is down in 2D, so this vector points -Y.
|
||||
|
||||
.. rst-class:: classref-constant
|
||||
|
||||
**DOWN** = ``Vector2i(0, 1)``
|
||||
**DOWN** = ``Vector2i(0, 1)`` :ref:`🔗<class_Vector2i_constant_DOWN>`
|
||||
|
||||
Down unit vector. Y is down in 2D, so this vector points +Y.
|
||||
|
||||
@@ -260,7 +260,7 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`int<class_int>` **x** = ``0``
|
||||
:ref:`int<class_int>` **x** = ``0`` :ref:`🔗<class_Vector2i_property_x>`
|
||||
|
||||
The vector's X component. Also accessible by using the index position ``[0]``.
|
||||
|
||||
@@ -272,7 +272,7 @@ The vector's X component. Also accessible by using the index position ``[0]``.
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`int<class_int>` **y** = ``0``
|
||||
:ref:`int<class_int>` **y** = ``0`` :ref:`🔗<class_Vector2i_property_y>`
|
||||
|
||||
The vector's Y component. Also accessible by using the index position ``[1]``.
|
||||
|
||||
@@ -289,7 +289,7 @@ Constructor Descriptions
|
||||
|
||||
.. rst-class:: classref-constructor
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **Vector2i**\ (\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **Vector2i**\ (\ ) :ref:`🔗<class_Vector2i_constructor_Vector2i>`
|
||||
|
||||
Constructs a default-initialized **Vector2i** with all components set to ``0``.
|
||||
|
||||
@@ -336,7 +336,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **abs**\ (\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **abs**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_abs>`
|
||||
|
||||
Returns a new vector with all components in absolute values (i.e. positive).
|
||||
|
||||
@@ -348,7 +348,7 @@ Returns a new vector with all components in absolute values (i.e. positive).
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **aspect**\ (\ ) |const|
|
||||
:ref:`float<class_float>` **aspect**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_aspect>`
|
||||
|
||||
Returns the aspect ratio of this vector, the ratio of :ref:`x<class_Vector2i_property_x>` to :ref:`y<class_Vector2i_property_y>`.
|
||||
|
||||
@@ -360,7 +360,7 @@ Returns the aspect ratio of this vector, the ratio of :ref:`x<class_Vector2i_pro
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **clamp**\ (\ min\: :ref:`Vector2i<class_Vector2i>`, max\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **clamp**\ (\ min\: :ref:`Vector2i<class_Vector2i>`, max\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_clamp>`
|
||||
|
||||
Returns a new vector with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component.
|
||||
|
||||
@@ -372,7 +372,7 @@ Returns a new vector with all components clamped between the components of ``min
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **clampi**\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **clampi**\ (\ min\: :ref:`int<class_int>`, max\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_clampi>`
|
||||
|
||||
Returns a new vector with all components clamped between ``min`` and ``max``, by running :ref:`@GlobalScope.clamp<class_@GlobalScope_method_clamp>` on each component.
|
||||
|
||||
@@ -384,7 +384,7 @@ Returns a new vector with all components clamped between ``min`` and ``max``, by
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **distance_squared_to**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
|
||||
:ref:`int<class_int>` **distance_squared_to**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_distance_squared_to>`
|
||||
|
||||
Returns the squared distance between this vector and ``to``.
|
||||
|
||||
@@ -398,7 +398,7 @@ This method runs faster than :ref:`distance_to<class_Vector2i_method_distance_to
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
|
||||
:ref:`float<class_float>` **distance_to**\ (\ to\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_distance_to>`
|
||||
|
||||
Returns the distance between this vector and ``to``.
|
||||
|
||||
@@ -410,7 +410,7 @@ Returns the distance between this vector and ``to``.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **length**\ (\ ) |const|
|
||||
:ref:`float<class_float>` **length**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_length>`
|
||||
|
||||
Returns the length (magnitude) of this vector.
|
||||
|
||||
@@ -422,7 +422,7 @@ Returns the length (magnitude) of this vector.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **length_squared**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **length_squared**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_length_squared>`
|
||||
|
||||
Returns the squared length (squared magnitude) of this vector.
|
||||
|
||||
@@ -436,7 +436,7 @@ This method runs faster than :ref:`length<class_Vector2i_method_length>`, so pre
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **max**\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **max**\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_max>`
|
||||
|
||||
Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2i(maxi(x, with.x), maxi(y, with.y))``.
|
||||
|
||||
@@ -448,7 +448,7 @@ Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **max_axis_index**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **max_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_max_axis_index>`
|
||||
|
||||
Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_X<class_Vector2i_constant_AXIS_X>`.
|
||||
|
||||
@@ -460,7 +460,7 @@ Returns the axis of the vector's highest value. See ``AXIS_*`` constants. If all
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **maxi**\ (\ with\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **maxi**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_maxi>`
|
||||
|
||||
Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2i(maxi(x, with), maxi(y, with))``.
|
||||
|
||||
@@ -472,7 +472,7 @@ Returns the component-wise maximum of this and ``with``, equivalent to ``Vector2
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **min**\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **min**\ (\ with\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_min>`
|
||||
|
||||
Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2i(mini(x, with.x), mini(y, with.y))``.
|
||||
|
||||
@@ -484,7 +484,7 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **min_axis_index**\ (\ ) |const|
|
||||
:ref:`int<class_int>` **min_axis_index**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_min_axis_index>`
|
||||
|
||||
Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all components are equal, this method returns :ref:`AXIS_Y<class_Vector2i_constant_AXIS_Y>`.
|
||||
|
||||
@@ -496,7 +496,7 @@ Returns the axis of the vector's lowest value. See ``AXIS_*`` constants. If all
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **mini**\ (\ with\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **mini**\ (\ with\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_mini>`
|
||||
|
||||
Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2i(mini(x, with), mini(y, with))``.
|
||||
|
||||
@@ -508,7 +508,7 @@ Returns the component-wise minimum of this and ``with``, equivalent to ``Vector2
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **sign**\ (\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **sign**\ (\ ) |const| :ref:`🔗<class_Vector2i_method_sign>`
|
||||
|
||||
Returns a new vector with each component set to ``1`` if it's positive, ``-1`` if it's negative, and ``0`` if it's zero. The result is identical to calling :ref:`@GlobalScope.sign<class_@GlobalScope_method_sign>` on each component.
|
||||
|
||||
@@ -520,7 +520,7 @@ Returns a new vector with each component set to ``1`` if it's positive, ``-1`` i
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **snapped**\ (\ step\: :ref:`Vector2i<class_Vector2i>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **snapped**\ (\ step\: :ref:`Vector2i<class_Vector2i>`\ ) |const| :ref:`🔗<class_Vector2i_method_snapped>`
|
||||
|
||||
Returns a new vector with each component snapped to the closest multiple of the corresponding component in ``step``.
|
||||
|
||||
@@ -532,7 +532,7 @@ Returns a new vector with each component snapped to the closest multiple of the
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **snappedi**\ (\ step\: :ref:`int<class_int>`\ ) |const|
|
||||
:ref:`Vector2i<class_Vector2i>` **snappedi**\ (\ step\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Vector2i_method_snappedi>`
|
||||
|
||||
Returns a new vector with each component snapped to the closest multiple of ``step``.
|
||||
|
||||
@@ -549,7 +549,7 @@ Operator Descriptions
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`bool<class_bool>` **operator !=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_neq_Vector2i>`
|
||||
|
||||
Returns ``true`` if the vectors are not equal.
|
||||
|
||||
@@ -561,7 +561,7 @@ Returns ``true`` if the vectors are not equal.
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator %**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator %**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_mod_Vector2i>`
|
||||
|
||||
Gets the remainder of each component of the **Vector2i** with the components of the given **Vector2i**. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers.
|
||||
|
||||
@@ -577,7 +577,7 @@ Gets the remainder of each component of the **Vector2i** with the components of
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator %**\ (\ right\: :ref:`int<class_int>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator %**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_mod_int>`
|
||||
|
||||
Gets the remainder of each component of the **Vector2i** with the given :ref:`int<class_int>`. This operation uses truncated division, which is often not desired as it does not work well with negative numbers. Consider using :ref:`@GlobalScope.posmod<class_@GlobalScope_method_posmod>` instead if you want to handle negative numbers.
|
||||
|
||||
@@ -593,7 +593,7 @@ Gets the remainder of each component of the **Vector2i** with the given :ref:`in
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_mul_Vector2i>`
|
||||
|
||||
Multiplies each component of the **Vector2i** by the components of the given **Vector2i**.
|
||||
|
||||
@@ -609,7 +609,7 @@ Multiplies each component of the **Vector2i** by the components of the given **V
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`float<class_float>`\ )
|
||||
:ref:`Vector2<class_Vector2>` **operator ***\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector2i_operator_mul_float>`
|
||||
|
||||
Multiplies each component of the **Vector2i** by the given :ref:`float<class_float>`. Returns a :ref:`Vector2<class_Vector2>`.
|
||||
|
||||
@@ -625,7 +625,7 @@ Multiplies each component of the **Vector2i** by the given :ref:`float<class_flo
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`int<class_int>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator ***\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_mul_int>`
|
||||
|
||||
Multiplies each component of the **Vector2i** by the given :ref:`int<class_int>`.
|
||||
|
||||
@@ -637,7 +637,7 @@ Multiplies each component of the **Vector2i** by the given :ref:`int<class_int>`
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator +**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator +**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_sum_Vector2i>`
|
||||
|
||||
Adds each component of the **Vector2i** by the components of the given **Vector2i**.
|
||||
|
||||
@@ -653,7 +653,7 @@ Adds each component of the **Vector2i** by the components of the given **Vector2
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator -**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator -**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_dif_Vector2i>`
|
||||
|
||||
Subtracts each component of the **Vector2i** by the components of the given **Vector2i**.
|
||||
|
||||
@@ -669,7 +669,7 @@ Subtracts each component of the **Vector2i** by the components of the given **Ve
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator /**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator /**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_div_Vector2i>`
|
||||
|
||||
Divides each component of the **Vector2i** by the components of the given **Vector2i**.
|
||||
|
||||
@@ -685,7 +685,7 @@ Divides each component of the **Vector2i** by the components of the given **Vect
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **operator /**\ (\ right\: :ref:`float<class_float>`\ )
|
||||
:ref:`Vector2<class_Vector2>` **operator /**\ (\ right\: :ref:`float<class_float>`\ ) :ref:`🔗<class_Vector2i_operator_div_float>`
|
||||
|
||||
Divides each component of the **Vector2i** by the given :ref:`float<class_float>`. Returns a :ref:`Vector2<class_Vector2>`.
|
||||
|
||||
@@ -701,7 +701,7 @@ Divides each component of the **Vector2i** by the given :ref:`float<class_float>
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator /**\ (\ right\: :ref:`int<class_int>`\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator /**\ (\ right\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_div_int>`
|
||||
|
||||
Divides each component of the **Vector2i** by the given :ref:`int<class_int>`.
|
||||
|
||||
@@ -713,7 +713,7 @@ Divides each component of the **Vector2i** by the given :ref:`int<class_int>`.
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`bool<class_bool>` **operator <**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_lt_Vector2i>`
|
||||
|
||||
Compares two **Vector2i** vectors by first checking if the X value of the left vector is less than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
|
||||
@@ -725,7 +725,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`bool<class_bool>` **operator <=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_lte_Vector2i>`
|
||||
|
||||
Compares two **Vector2i** vectors by first checking if the X value of the left vector is less than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
|
||||
@@ -737,7 +737,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`bool<class_bool>` **operator ==**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_eq_Vector2i>`
|
||||
|
||||
Returns ``true`` if the vectors are equal.
|
||||
|
||||
@@ -749,7 +749,7 @@ Returns ``true`` if the vectors are equal.
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`bool<class_bool>` **operator >**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_gt_Vector2i>`
|
||||
|
||||
Compares two **Vector2i** vectors by first checking if the X value of the left vector is greater than the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
|
||||
@@ -761,7 +761,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ )
|
||||
:ref:`bool<class_bool>` **operator >=**\ (\ right\: :ref:`Vector2i<class_Vector2i>`\ ) :ref:`🔗<class_Vector2i_operator_gte_Vector2i>`
|
||||
|
||||
Compares two **Vector2i** vectors by first checking if the X value of the left vector is greater than or equal to the X value of the ``right`` vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
|
||||
|
||||
@@ -773,7 +773,7 @@ Compares two **Vector2i** vectors by first checking if the X value of the left v
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ )
|
||||
:ref:`int<class_int>` **operator []**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Vector2i_operator_idx_int>`
|
||||
|
||||
Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x``, and ``v[1]`` is equivalent to ``v.y``.
|
||||
|
||||
@@ -785,7 +785,7 @@ Access vector components using their ``index``. ``v[0]`` is equivalent to ``v.x`
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator unary+**\ (\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator unary+**\ (\ ) :ref:`🔗<class_Vector2i_operator_unplus>`
|
||||
|
||||
Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, but sometimes it can make your code more readable.
|
||||
|
||||
@@ -797,7 +797,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing,
|
||||
|
||||
.. rst-class:: classref-operator
|
||||
|
||||
:ref:`Vector2i<class_Vector2i>` **operator unary-**\ (\ )
|
||||
:ref:`Vector2i<class_Vector2i>` **operator unary-**\ (\ ) :ref:`🔗<class_Vector2i_operator_unminus>`
|
||||
|
||||
Returns the negative value of the **Vector2i**. This is the same as writing ``Vector2i(-v.x, -v.y)``. This operation flips the direction of the vector while keeping the same magnitude.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user