xs_vec_reflect
- Синтаксис
-
stock xs_vec_reflect(const Float:vec[], const Float:normal[], Float:out[]) { // normalize(vec) - (normal * 2.0 * (tmp . normal)) * length(vec) new Float:tmp1[3]; xs_vec_normalize(vec, tmp1); // tmp1 - (normal * 2.0 * (tmp . normal)) * length(vec) new Float:tmp2[3]; xs_vec_mul_scalar(normal, 2.0, tmp2); xs_vec_mul_scalar(tmp2, xs_vec_dot(tmp1, normal), tmp2); // tmp1 - tmp2 * length(vec) xs_vec_mul_scalar(tmp2, xs_vec_len(vec), tmp2); // tmp1 - tmp2 xs_vec_sub(tmp1, tmp2, out); }
Переменная | Описание |
---|---|
Нет агрументов |
- Описание
- This function has no description.