Optimize label size calculation

This commit is contained in:
Georg Hagen
2025-01-05 16:31:04 +01:00
parent e9a1c629d9
commit aca64c57b7
6 changed files with 102 additions and 103 deletions

View File

@@ -177,3 +177,15 @@ glm::vec<L, float, Q> operator / (const float lhs, const glm::vec<L, T, Q>& rhs)
{
return lhs / glm::vec<L, float, Q>(rhs);
}
template<glm::length_t L, typename T, glm::qualifier Q, typename = std::enable_if_t<std::is_integral_v<T>>>
glm::vec<L, float, Q> operator * (const float lhs, const glm::vec<L, T, Q>& rhs)
{
return lhs * glm::vec<L, float, Q>(rhs);
}
template<glm::length_t L, typename T, glm::qualifier Q, typename = std::enable_if_t<std::is_integral_v<T>>>
glm::vec<L, float, Q> operator * (const glm::vec<L, float, Q>& lhs, const T rhs)
{
return lhs * static_cast<float>(rhs);
}