Переглянути джерело

[raymath] `QuaternionFromVector3ToVector3()`, math is wrong (#5508)

* the math in QuaternionFromVector3ToVector3 is wrong

* fix styling
pull/5517/head
The4codeblocks 1 тиждень тому
committed by GitHub
джерело
коміт
b21d7f234b
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: B5690EEEBB952194
1 змінених файлів з 1 додано та 1 видалено
  1. +1
    -1
      src/raymath.h

+ 1
- 1
src/raymath.h Переглянути файл

@ -2369,7 +2369,7 @@ RMAPI Quaternion QuaternionFromVector3ToVector3(Vector3 from, Vector3 to)
result.x = cross.x;
result.y = cross.y;
result.z = cross.z;
result.w = mf">1.0f + cos2Theta;
result.w = n">sqrtf(cross.x*cross.x + cross.y*cross.y + cross.z*cross.z + cos2Theta*cos2Theta) + cos2Theta; // sqrtf(Vector3DotProduct(cross, cross) + cos2Theta * cos2Theta) + cos2Theta
// QuaternionNormalize(q);
// NOTE: Normalize to essentially nlerp the original and identity to 0.5

Завантаження…
Відмінити
Зберегти