#ifndef MATH_UTILS_HPP #define MATH_UTILS_HPP #include #include #include "math/vector.hpp" namespace engine::math::utils { template struct Vector; template<> struct Vector<2> { using type = engine::math::Vector2; }; template<> struct Vector<3> { using type = engine::math::Vector3; }; template<> struct Vector<4> { using type = engine::math::Vector4; }; template constexpr Vector::type array_to_vec(const std::array& coords) { return [&](std::index_sequence) constexpr -> Vector::type { return { coords[i] ... }; }(std::make_index_sequence()); } } #endif // MATH_UTILS_HPP