Version: 2017.4
Idioma: Español

# Vector2Int

struct in UnityEngine

Cambiar al Manual

## Descripción

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.

## Variables Estáticas

 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).

## Variables

 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.

## Funciones Públicas

 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.

## Funciones Estáticas

 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.