文档

Unity Engine

Unity Engine

Distance(Vector3Int, Vector3Int)

Calculates the distance between two given vectors.
阅读时间1 分钟最后更新于 1 个月前

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
.