You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write a config file using glm and wanted to use glm::normalize with constexpr. If I am understanding correctly it is due to inversesqrt relying on std::sqrt, which is not constexpr.
This document (part III-D) could be relevant for the decision for not using sqrt as constexpr in cmath.
Could we have a feature to use a constexpr version of glm::normalize which would internally rely on something other than std::sqrt as I feel normalize is a very commonly used function and could benefit from being computed at compile time.
Edit: I am using C++17 which has a compile time sqrt in cmath
I am trying to write a config file using glm and wanted to use
glm::normalize
withconstexpr
. If I am understanding correctly it is due toinversesqrt
relying onstd::sqrt
, which is notconstexpr
.This document (part III-D) could be relevant for the decision for not using
sqrt
as constexpr incmath
.Could we have a feature to use a
constexpr
version ofglm::normalize
which would internally rely on something other thanstd::sqrt
as I feel normalize is a very commonly used function and could benefit from being computed at compile time.Edit: I am using C++17 which has a compile time sqrt in cmath
The text was updated successfully, but these errors were encountered: