68 T
lerp(
const T& a,
const T& b,
float t) {
69 t = std::clamp(t, 0.0F, 1.0F);
71 return a + (b - a) * t;
asw::Vec2< float > getTextureSize(const asw::Texture &tex)
Get texture size.
asw::Color makeColor(int r, int g, int b)
Make a color from RGB values.
asw::Vec2< int > getTextSize(const asw::Font &font, const std::string &text)
Get text size.
void abortOnError(const std::string &message)
Abort program and display error message.
T lerp(const T &a, const T &b, float t)
Lerp between two values.
std::shared_ptr< TTF_Font > Font
Alias for a shared pointer to an TTF_Font.
std::shared_ptr< SDL_Texture > Texture
Alias for a shared pointer to an SDL_Texture.
SDL_Color Color
Alias for an SDL_Color.
Types used throughout the ASW library.