xs_vec_distance_2d
- Синтаксис
-
stock Float:xs_vec_distance_2d(const Float:vec1[], const Float:vec2[]) { return xs_sqrt((vec1[0]-vec2[0]) * (vec1[0]-vec2[0]) + (vec1[1]-vec2[1]) * (vec1[1]-vec2[1])); }
Переменная | Описание |
---|---|
vec1 |
First vector. |
vec2 |
Second vector. |
- Описание
- Computes the distance between two 2D vectors (points).
- Возвращает
- The distance between two vectors.