Add float_val / int_vec convenience operator

This commit is contained in:
Georg Hagen
2024-12-16 14:31:06 +01:00
parent f8fadc0c81
commit 521fec3513

View File

@@ -171,3 +171,9 @@ namespace OpenVulkano::Math
typedef Quaternion<double> QuaternionD;
typedef Quaternion<int> QuaternionI;
}
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);
}