## Vector2 class

  A vector with two components.


## Properties

| Name | Description |
| --- | --- |
| 	x | The x component. | 
| 	y | The y component. | 

## Methods

### constructor{#constructor}

| Name | Description |
| --- | --- |
| constructor() |  | 

 **Result:**



---


### constructor_overload{#constructor_overload}

| Name | Description |
| --- | --- |
| constructor_overload(s) | Initializes a new instance of the Vector2 struct. | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| s | Number | S. |

 **Result:**



---


### constructor_overload2{#constructor_overload2}

| Name | Description |
| --- | --- |
| constructor_overload2(vec) | Initializes a new instance of the Vector2 struct. | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| vec | FVector2 | Vector in float. |

 **Result:**



---


### constructor_overload3{#constructor_overload3}

| Name | Description |
| --- | --- |
| constructor_overload3(x, y) | Initializes a new instance of the Vector2 struct. | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| x | Number | The x coordinate. |
| y | Number | The y coordinate. |

 **Result:**



---


### getU{#getU}

| Name | Description |
| --- | --- |
| getU() | Gets or sets the U component if the Vector2 is used as a mapping coordinate. It's an alias of x component. | 

 **Result:**



---


### setU{#setU}

| Name | Description |
| --- | --- |
| setU(value) | Gets or sets the U component if the Vector2 is used as a mapping coordinate. It's an alias of x component. | 

 **Result:**



---


### getV{#getV}

| Name | Description |
| --- | --- |
| getV() | Gets or sets the V component if the Vector2 is used as a mapping coordinate. It's an alias of y component. | 

 **Result:**



---


### setV{#setV}

| Name | Description |
| --- | --- |
| setV(value) | Gets or sets the V component if the Vector2 is used as a mapping coordinate. It's an alias of y component. | 

 **Result:**



---


### getLength{#getLength}

| Name | Description |
| --- | --- |
| getLength() | Gets the length. The length. | 

 **Result:**



---


### dot{#dot}

| Name | Description |
| --- | --- |
| dot(rhs) | Gets the dot product of two vectors | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| rhs | Vector2 | Right hand side value. |

 **Result:**
Number


---


### equals{#equals}

| Name | Description |
| --- | --- |
| equals(rhs) | Check if two vector2 equals | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| rhs | Vector2 | The right hand side value. |

 **Result:**
boolean


---


### hashCode{#hashCode}

| Name | Description |
| --- | --- |
| hashCode() | Gets the hash code of Vector2 | 

 **Result:**
Number


---


### equals{#equals}

| Name | Description |
| --- | --- |
| equals(obj) | Check if two vector2 equals | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| obj | Object | The object to compare. |

 **Result:**
boolean


---


### toString{#toString}

| Name | Description |
| --- | --- |
| toString() | Returns a java.lang.String that represents the current Vector2. | 

 **Result:**
String


---


### cross{#cross}

| Name | Description |
| --- | --- |
| cross(v) | Cross product of two vectors | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
|   | Vector2 | null |

 **Result:**
Number


---


### normalize{#normalize}

| Name | Description |
| --- | --- |
| normalize() | Normalizes this instance. | 

 **Result:**
Vector2


---


### compareTo{#compareTo}

| Name | Description |
| --- | --- |
| compareTo(other) | Compare current vector to another instance. | 

 **Parameters:**

| Name | Type | Description |
| --- | --- | --- |
|  othe | Vector2 | null |

 **Result:**
Number


---



