g-truc / glm

OpenGL Mathematics (GLM)
https://glm.g-truc.net
Other
9.05k stars 2.1k forks source link

Fixed vec equality check function from the compute_vector_decl.hpp file #1290

Closed Fox-Ops-Coder closed 4 months ago

Fox-Ops-Coder commented 4 months ago

The compute_vec_equal functor incorrectly compares vectors. Based on the code, it appears that it should be using the [] operator to compare the values, but it is only using the x field.

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);
christophe-lunarg commented 4 months ago

Thanks for contributing!