SFTK/include/gtypes.hpp

25 lines
391 B
C++
Raw Permalink Normal View History

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>
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