2024-08-03 04:11:49 +08:00
|
|
|
#ifndef GTYPES_HPP
|
|
|
|
#define GTYPES_HPP
|
|
|
|
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
constexpr sf::Vector2<T> vec(T x, T y)
|
|
|
|
{
|
|
|
|
return sf::Vector2(x, y);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class T>
|
|
|
|
constexpr sf::Vector3<T> vec(T x, T y, T z)
|
|
|
|
{
|
|
|
|
return sf::Vector3(x, y, z);
|
|
|
|
}
|
|
|
|
|
|
|
|
template <class T>
|
2024-09-11 21:03:19 +08:00
|
|
|
constexpr sf::Rect<T> rec(T x, T y, T width, T height)
|
2024-08-03 04:11:49 +08:00
|
|
|
{
|
|
|
|
return sf::Rect(x, y, width, height);
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|