Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Distance(Vector3Int, Vector3Int)

Calculates the distance between two given vectors.
Read time 1 minuteLast updated 8 days ago

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public static float Distance(Vector3Int a, Vector3Int b)

Parameters

The first vector to check.

The second vector to check.

Returns

Type

Description

floatThe distance between
a
and
b
.

Remarks

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