Update compute_vector_decl.hpp

Fix elementwise equality check in compute_vec_equal

Previously, the equality operator compared only the first element (v1.x and v2.x) repeatedly for all components. This commit updates the loop to use the index operator (v1[i] and v2[i]) so that every corresponding element is compared correctly.
This commit is contained in:
Ayush Sharma 2025-03-31 18:46:33 +05:30 committed by GitHub
parent dca38025fb
commit f11563c190
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -160,7 +160,7 @@ namespace glm {
{
bool b = true;
for (length_t i = 0; i < L; ++i)
b = b && detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1.x, v2.x);
b = b && detail::compute_equal<T, std::numeric_limits<T>::is_iec559>::call(v1[i], v2[i]);
return b;
}
};