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
In many situations template functions involve length or squared length computations on the input values. For example the centripetal and chordal Catmull-Rom spline variants involve length and squared length computations on the control points. If you interpolate between multidimensional points (vec2, vec3, vec4) then everything is fine, however when you interpolate between scalar values glm lacks the support. The only way to solve this now is creating SFINAE function/class overloads for vector and non-vector types (where you calculate length on vector types and absolute value on scalar types), however with scalar glm::length() and glm::length2() the issue could be solved without additional effort or metaprogramming. Of course a scalar length is just an absolute value, and length2 is just a square, yet these variants can be very helpful. It is also makes sense because the geometric length function is just a specialized case of the generalized term magnitude.
The text was updated successfully, but these errors were encountered:
In many situations template functions involve length or squared length computations on the input values. For example the centripetal and chordal Catmull-Rom spline variants involve length and squared length computations on the control points. If you interpolate between multidimensional points (vec2, vec3, vec4) then everything is fine, however when you interpolate between scalar values glm lacks the support. The only way to solve this now is creating SFINAE function/class overloads for vector and non-vector types (where you calculate length on vector types and absolute value on scalar types), however with scalar glm::length() and glm::length2() the issue could be solved without additional effort or metaprogramming. Of course a scalar length is just an absolute value, and length2 is just a square, yet these variants can be very helpful. It is also makes sense because the geometric length function is just a specialized case of the generalized term magnitude.
The text was updated successfully, but these errors were encountered: