기술 자료

Unity Engine

Unity Engine

Distance(Vector2, Vector2)

Returns the distance between a and b.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

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

Parameters

Returns

Type

Description

float

Remarks

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