Show / Hide Table of Contents

# Struct Vector2

##### Implements

IEquatable<Vector2>
IFormattable

##### Inherited Members

System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)

###### Namespace: FFXIVClientStructs.FFXIV.Common.Math

###### Assembly: FFXIVClientStructs.dll

##### Syntax

    public struct Vector2

### Constructors

| Improve this Doc View Source

#### Vector2(Single)

##### Declaration

    public Vector2(float value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | value |

| Improve this Doc View Source

#### Vector2(Single, Single)

##### Declaration

    public Vector2(float x, float y)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | x |
System.Single | y |

### Fields

| Improve this Doc View Source

#### Down

##### Declaration

    public static readonly Vector2 Down

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Left

##### Declaration

    public static readonly Vector2 Left

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### NegativeInfinity

##### Declaration

    public static readonly Vector2 NegativeInfinity

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### One

##### Declaration

    public static readonly Vector2 One

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### PositiveInfinity

##### Declaration

    public static readonly Vector2 PositiveInfinity

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Right

##### Declaration

    public static readonly Vector2 Right

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Up

##### Declaration

    public static readonly Vector2 Up

##### Field Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### X

##### Declaration

    public float X

##### Field Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Y

##### Declaration

    public float Y

##### Field Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Zero

##### Declaration

    public static readonly Vector2 Zero

##### Field Value

Type | Description
--- | ---
Vector2 |

### Properties

| Improve this Doc View Source

#### Magnitude

##### Declaration

    public readonly float Magnitude { get; }

##### Property Value

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Normalized

##### Declaration

    public readonly Vector2 Normalized { get; }

##### Property Value

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### SqrMagnitude

##### Declaration

    public readonly float SqrMagnitude { get; }

##### Property Value

Type | Description
--- | ---
System.Single |

### Methods

| Improve this Doc View Source

#### Angle(Vector2, Vector2)

##### Declaration

    public static float Angle(Vector2 from, Vector2 to)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | from |
Vector2 | to |

##### Returns

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Clamp(Vector2, Vector2, Vector2)

##### Declaration

    public static Vector2 Clamp(Vector2 value, Vector2 min, Vector2 max)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | value |
Vector2 | min |
Vector2 | max |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Distance(Vector2, Vector2)

##### Declaration

    public static float Distance(Vector2 a, Vector2 b)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |

##### Returns

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Dot(Vector2, Vector2)

##### Declaration

    public static float Dot(Vector2 lhs, Vector2 rhs)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | lhs |
Vector2 | rhs |

##### Returns

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### Equals(Vector2)

##### Declaration

    public bool Equals(Vector2 other)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | other |

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Equals(Object)

##### Declaration

    public override bool Equals(object obj)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Object | obj |

##### Returns

Type | Description
--- | ---
System.Boolean |

##### Overrides

System.ValueType.Equals(System.Object)
| Improve this Doc View Source

#### GetHashCode()

##### Declaration

    public override int GetHashCode()

##### Returns

Type | Description
--- | ---
System.Int32 |

##### Overrides

System.ValueType.GetHashCode()
| Improve this Doc View Source

#### Lerp(Vector2, Vector2, Single)

##### Declaration

    public static Vector2 Lerp(Vector2 a, Vector2 b, float t)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |
System.Single | t |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### LerpUnclamped(Vector2, Vector2, Single)

##### Declaration

    public static Vector2 LerpUnclamped(Vector2 a, Vector2 b, float t)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |
System.Single | t |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Max(Vector2, Vector2)

##### Declaration

    public static Vector2 Max(Vector2 value1, Vector2 value2)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | value1 |
Vector2 | value2 |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Min(Vector2, Vector2)

##### Declaration

    public static Vector2 Min(Vector2 value1, Vector2 value2)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | value1 |
Vector2 | value2 |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### MoveTowards(Vector2, Vector2, Single)

##### Declaration

    public static Vector2 MoveTowards(Vector2 current, Vector2 target, float maxDistanceDelta)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | current |
Vector2 | target |
System.Single | maxDistanceDelta |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Normalize(Vector2)

##### Declaration

    public static Vector2 Normalize(Vector2 value)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | value |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Reflect(Vector2, Vector2)

##### Declaration

    public static Vector2 Reflect(Vector2 vector, Vector2 normal)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | vector |
Vector2 | normal |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### SignedAngle(Vector2, Vector2)

##### Declaration

    public static float SignedAngle(Vector2 from, Vector2 to)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | from |
Vector2 | to |

##### Returns

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### SmoothStep(Vector2, Vector2, Single)

##### Declaration

    public static Vector2 SmoothStep(Vector2 start, Vector2 end, float amount)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | start |
Vector2 | end |
System.Single | amount |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### SqrDistance(Vector2, Vector2)

##### Declaration

    public static float SqrDistance(Vector2 a, Vector2 b)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |

##### Returns

Type | Description
--- | ---
System.Single |

| Improve this Doc View Source

#### ToString()

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String |

##### Overrides

System.ValueType.ToString()
| Improve this Doc View Source

#### ToString(String, Nullable<IFormatProvider>)

##### Declaration

    public string ToString(string format, IFormatProvider? formatProvider)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | format |
System.Nullable<IFormatProvider> | formatProvider |

##### Returns

Type | Description
--- | ---
System.String |

| Improve this Doc View Source

#### Transform(Vector2, Matrix4x4)

##### Declaration

    public static Vector2 Transform(Vector2 position, Matrix4x4 matrix)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | position |
Matrix4x4 | matrix |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Transform(Vector2, Quaternion)

##### Declaration

    public static Vector2 Transform(Vector2 value, Quaternion rotation)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | value |
Quaternion | rotation |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### TransformNormal(Vector2, Matrix4x4)

##### Declaration

    public static Vector2 TransformNormal(Vector2 normal, Matrix4x4 matrix)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | normal |
Matrix4x4 | matrix |

##### Returns

Type | Description
--- | ---
Vector2 |

### Operators

| Improve this Doc View Source

#### Addition(Vector2, Vector2)

##### Declaration

    public static Vector2 operator +(Vector2 a, Vector2 b)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Division(Vector2, Vector2)

##### Declaration

    public static Vector2 operator /(Vector2 a, Vector2 b)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Division(Vector2, Single)

##### Declaration

    public static Vector2 operator /(Vector2 a, float d)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
System.Single | d |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Equality(Vector2, Vector2)

##### Declaration

    public static bool operator ==(Vector2 left, Vector2 right)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | left |
Vector2 | right |

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Implicit(Vector2 to Vector2)

##### Declaration

    public static implicit operator Vector2(Vector2 v)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | v |

##### Returns

Type | Description
--- | ---
System.Numerics.Vector2 |

| Improve this Doc View Source

#### Implicit(Vector2 to Vector2)

##### Declaration

    public static implicit operator Vector2(Vector2 v)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Numerics.Vector2 | v |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Inequality(Vector2, Vector2)

##### Declaration

    public static bool operator !=(Vector2 left, Vector2 right)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | left |
Vector2 | right |

##### Returns

Type | Description
--- | ---
System.Boolean |

| Improve this Doc View Source

#### Multiply(Vector2, Vector2)

##### Declaration

    public static Vector2 operator *(Vector2 a, Vector2 b)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Multiply(Vector2, Single)

##### Declaration

    public static Vector2 operator *(Vector2 a, float d)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
System.Single | d |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Multiply(Single, Vector2)

##### Declaration

    public static Vector2 operator *(float d, Vector2 a)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Single | d |
Vector2 | a |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### Subtraction(Vector2, Vector2)

##### Declaration

    public static Vector2 operator -(Vector2 a, Vector2 b)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |
Vector2 | b |

##### Returns

Type | Description
--- | ---
Vector2 |

| Improve this Doc View Source

#### UnaryNegation(Vector2)

##### Declaration

    public static Vector2 operator -(Vector2 a)

##### Parameters

Type | Name | Description
--- | --- | ---
Vector2 | a |

##### Returns

Type | Description
--- | ---
Vector2 |

### Implements

IEquatable<>
IFormattable