49 T
lerp(
const T& a,
const T& b,
float t) {
50 t = std::clamp(t, 0.0F, 1.0F);
52 return a + (b - a) * t;
asw::Vec2< float > getTextureSize(const asw::Texture &tex)
Get texture size.
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.
Types used throughout the ASW library.