Skip to content

format

typescript
Vector2.EqualsTo(other)

class: Vector2

description

Determines whether the current Vector2 is equal to the target Vector2.

parameter

param_nametypedescription
otherVector2The target Vector2.

reture

typedescription
booleanTrue if the two Vector2 are equal; otherwise, false.

code example

typescript
let v2 = new Vector2(1, 2);
let other = new Vector2(1, 2);
Debug.Log(v2.EqualsTo(other)); // true