Representation of 2D vectors and points using integers.
This structure is used in some places to represent 2D positions and vectors that don't require the precision of floating-point.
down | Shorthand for writing Vector2Int (0, -1). |
left | Shorthand for writing Vector2Int (-1, 0). |
one | Shorthand for writing Vector2Int (1, 1). |
right | Shorthand for writing Vector2Int (1, 0). |
up | Shorthand for writing Vector2Int (0, 1). |
zero | Shorthand for writing Vector2Int (0, 0). |
magnitude | Retorna la longitud de este vector (Read Only). |
sqrMagnitude | Retorna la longitud cuadrada de este vector (Read Only). |
this[int] | Acceda al componente x o y utilizando [0] o [1] respectivamente. |
x | Componente X del vector. |
y | Componente Y del vector. |
Clamp | Clamps the Vector2Int to the bounds given by min and max. |
Equals | Returns true if the objects are equal. |
GetHashCode | Gets the hash code for the Vector2Int. |
Set | Set x and y components of an existing Vector2Int. |
ToString | Retorna un string bien formateado para este vector. |
CeilToInt | Converts a Vector2 to a Vector2Int by doing a Ceiling to each value. |
Distance | Devuelve la distancia entre a y b. |
FloorToInt | Converts a Vector2 to a Vector2Int by doing a Floor to each value. |
Max | Retorna un vector que está hecho de los componentes más grandes de dos vectores. |
Min | Retorna un vector que está hecho de los componentes más pequeños de dos vectores. |
RoundToInt | Converts a Vector2 to a Vector2Int by doing a Round to each value. |
Scale | Multiplica dos vectores en función de los componentes. |
operator - | Resta un vector a otro. |
operator != | Devuelve verdadero si los vectores son diferentes. |
operator * | Multiplica un vector por un número. |
operator / | Divide un vector por un número. |
operator + | Suma dos vectores. |
operator == | Devuelve true si dos vectores son iguales. |
Unknown operator | Converts a Vector2Int to a Vector3Int. |
Vector2 | Converts a Vector2Int to a Vector2. |