diff --git a/include/llmr/util/vec.hpp b/include/llmr/util/vec.hpp index 770776160..828a6a5fb 100644 --- a/include/llmr/util/vec.hpp +++ b/include/llmr/util/vec.hpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace llmr { @@ -47,6 +48,10 @@ struct vec2 { y *= o; } + inline vec2 operator *(const std::array& matrix) { + return { x * matrix[0] + y * matrix[4] + matrix[12], x * matrix[1] + y * matrix[5] + matrix[13] }; + } + template inline typename std::enable_if::value, vec2>::type operator-(O o) const {