Representación de vectores 2D y puntos.
This structure is used in some places to represent 2D positions and vectors (e.g. texture coordinates in a Mesh or texture offsets in Material). In the majority of other cases a Vector3 is used.
| down | Forma corta de escribir Vector2(0, -1). |
| left | Forma corta de escribir Vector2(-1, 0). |
| negativeInfinity | Shorthand for writing Vector2(float.NegativeInfinity, float.NegativeInfinity). |
| one | Forma corta de escribir Vector2(1, 1). |
| positiveInfinity | Shorthand for writing Vector2(float.PositiveInfinity, float.PositiveInfinity). |
| right | Forma corta de escribir Vector2(1, 0). |
| up | Forma corta de escribir Vector2(0, 1). |
| zero | Forma corta de escribir Vector2(0, 0). |
| magnitude | Retorna la longitud de este vector (Read Only). |
| normalized | Retorna este vector con una magnitude de 1 (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. |
| Vector2 | Construye un nuevo vector con componentes X, Y dados. |
| Equals | Returns true if the given vector is exactly equal to this vector. |
| Normalize | Hace que este vector tenga una magnitude de 1. |
| Set | Establece los componentes X y Y de un Vector2 existente. |
| ToString | Returns a formatted string for this vector. |
| Angle | Returns the unsigned angle in degrees between from and to. |
| ClampMagnitude | Retorna una copia de vector con su magnitud sujeta a maxLength. |
| Distance | Devuelve la distancia entre a y b. |
| Dot | Producto escalar de dos vectores. |
| Lerp | Interpola linealmente entre los vectores a y b por t. |
| LerpUnclamped | Interpola linealmente entre los vectores a y b por t. |
| 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. |
| MoveTowards | Mueve un punto current hacia target. |
| Perpendicular | Returns the 2D vector perpendicular to this 2D vector. The result is always rotated 90-degrees in a counter-clockwise direction for a 2D coordinate system where the positive Y axis goes up. |
| Reflect | Refleja un vector del vector definido por una normal. |
| Scale | Multiplica dos vectores en función de los componentes. |
| SignedAngle | Returns the signed angle in degrees between from and to. |
| SmoothDamp | Gradualmente cambia un vector hacia un objetivo deseado en el tiempo. |
| operator - | Resta un vector a otro. |
| operator * | Multiplica un vector por un número. |
| operator / | Divide un vector por un número. |
| operator + | Suma dos vectores. |
| operator == | Returns true if two vectors are approximately equal. |
| Vector2 | Converts a Vector3 to a Vector2. |
| Vector3 | Converts a Vector2 to a Vector3. |