Quaternion::fromBetweenVectors: pass u and v as const references (#21)

This commit is contained in:
KiraFlux
2025-10-19 10:17:38 +03:00
committed by Oleg Kalachev
parent e50a9d5fea
commit d06eb2a1aa

View File

@@ -45,7 +45,7 @@ public:
cx * cy * sz - sx * sy * cz);
}
static Quaternion fromBetweenVectors(Vector u, Vector v) {
static Quaternion fromBetweenVectors(const Vector& u, const Vector& v) {
float dot = u.x * v.x + u.y * v.y + u.z * v.z;
float w1 = u.y * v.z - u.z * v.y;
float w2 = u.z * v.x - u.x * v.z;