SFTK/include/gtypes.hpp

25 lines
391 B
C++

#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)
{
return sf::Rect(x, y, width, height);
}
#endif