project-kyoku/include/core/vector.h

21 lines
384 B
C++

#pragma once
#include <utility>
namespace kku
{
/// Vector2
///
/// Meaning an element of a vector space in math.
/// Don't mistake for std::vector<T>
template <typename T> using Vector2 = std::pair<T, T>;
template <typename T>
inline constexpr auto makeVector(T &&l, T &&r) -> Vector2<T>
{
return std::make_pair(std::forward<T>(l), std::forward<T>(r));
}
} // namespace kku