From a8b3118e8305fd1c668ea25e07157b625c9747ff Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 10 Apr 2021 17:29:02 +0000 Subject: add glm headers --- src/include/glm/gtx/exterior_product.inl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/include/glm/gtx/exterior_product.inl (limited to 'src/include/glm/gtx/exterior_product.inl') diff --git a/src/include/glm/gtx/exterior_product.inl b/src/include/glm/gtx/exterior_product.inl new file mode 100644 index 0000000..82dc4aa --- /dev/null +++ b/src/include/glm/gtx/exterior_product.inl @@ -0,0 +1,26 @@ +/// @ref gtx_exterior_product + +#include + +namespace glm { +namespace detail +{ + template + struct compute_cross_vec2 + { + GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) + { + GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); + + return v.x * u.y - u.x * v.y; + } + }; +}//namespace detail + + template + GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) + { + return detail::compute_cross_vec2::value>::call(x, y); + } +}//namespace glm + -- cgit v1.2.3-18-g5258