📅  最后修改于: 2022-03-11 14:49:12.750000             🧑  作者: Mango
//For Unity C#
float GetDistance(Vector2 posA, Vector2 posB) {
float dx = posA.x - posB.x;
float dy = posA.y - posB.y;
float distance = Mathf.Sqrt(dx * dx + dy * dy);
return distance;
}