g-truc / glm

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

Regression in 7f2a5b89b30d143014bc0363b99dc3d942457ae7 #1255

Closed mgerhardy closed 7 months ago

mgerhardy commented 7 months ago
template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<3, T, Q> operator/(vec<3, T, Q> const& v, T scalar)
{
  return vec<3, T, Q>(v) *= 1/scalar;
}

https://github.com/g-truc/glm/commit/7f2a5b89b30d143014bc0363b99dc3d942457ae7

this change breaks stuff like

glm::ivec3 center = _mins + _width / 2;

this basically means that center is now _mins because the division leads to *=0 for any scalar > 1

dimitre commented 7 months ago

I've noticed some template issues also when using the define

define GLM_FORCE_NEON

christophe-lunarg commented 7 months ago

Ok, I'll reverse it. :/ @laurentcau

laurentcau commented 6 months ago

Strange to not fix the issue instead of revert. Never mind. What is the template issues with GLM_FORCE_NEON ?

laurentcau commented 6 months ago

@dimitre