Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Vector2Int.Distance

public static float Distance(Vector2Int a, Vector2Int b);

Description

Returns the distance between a and b.

Vector2.Distance(a,b) is the same as (a-b).magnitude.

Did you find this page useful? Please give it a rating: