xs_vec_distance
- Синтаксис
-
stock Float:xs_vec_distance(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[2]-vec2[2]) * (vec1[2]-vec2[2])); }
Переменная | Описание |
---|---|
vec1 |
First vector. |
vec2 |
Second vector. |
- Описание
- Computes the distance between two vectors (points).
- Возвращает
- The distance between two vectors.