Представление 2D vector'ов и точек.
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 | Shorthand for writing Vector2(0, -1). |
| left | Shorthand for writing Vector2(-1, 0). |
| negativeInfinity | Shorthand for writing Vector2(float.NegativeInfinity, float.NegativeInfinity). |
| one | Сокращенное написание Vector2(1,1) |
| positiveInfinity | Shorthand for writing Vector2(float.PositiveInfinity, float.PositiveInfinity). |
| right | Сокращенное написание Vector2(1,0) |
| up | Сокращение написания Vector2(0,1) |
| zero | Сокращенное написание Vector2(0,0) |
| magnitude | Возвращает длину этого vector'a |
| normalized | Returns this vector with a magnitude of 1 (Read Only). |
| sqrMagnitude | Возвращает квадрат длины этого vector'a (Read Only) |
| this[int] | Доступ к x или y компонентам используются [0] или [1] соответственно |
| x | X компонент vector'a |
| y | Y компонент вектора. |
| Vector2 | Создает новый вектор с заданными х, у данными |
| Equals | Returns true if the given vector is exactly equal to this vector. |
| Normalize | Makes this vector have a magnitude of 1. |
| Set | Set x and y components of an existing Vector2. |
| ToString | Возвращает отформатированной строки для этого vector'a |
| Angle | Returns the unsigned angle in degrees between from and to. |
| ClampMagnitude | Returns a copy of vector with its magnitude clamped to maxLength. |
| Distance | Возвращает длину между а и /b/ |
| Dot | Dot Product of two vectors. |
| Lerp | Linearly interpolates between vectors a and b by t. |
| LerpUnclamped | Linearly interpolates between vectors a and b by t. |
| Max | Возвращает vector, который сделан из компонентов двух vector'oв |
| Min | Возвращает vector, который сделан из мелких компонентов двух vector'oв |
| MoveTowards | Перемещает из точки curren в /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 | Reflects a vector off the vector defined by a normal. |
| Scale | Покомпонентное умножение двух vector'oв |
| SignedAngle | Returns the signed angle in degrees between from and to. |
| SmoothDamp | Gradually changes a vector towards a desired goal over time. |
| operator - | Вычитает один vector из другого |
| operator * | Умножает vector на число |
| operator / | Делит vector на число |
| operator + | Добавляет два вектора. |
| operator == | Returns true if two vectors are approximately equal. |
| Vector2 | Converts a Vector3 to a Vector2. |
| Vector3 | Converts a Vector2 to a Vector3. |