Skip to content

Instantly share code, notes, and snippets.

View Faultz's full-sized avatar

Faultz

  • United Kingdom
View GitHub Profile
@Faultz
Faultz / animation.cpp
Last active June 3, 2022 01:35
Animation class for C++
#include "stdafx.h"
#define clamp(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
animations g_anim;
void animation_data::process_animation()
{
float elapsed_time = static_cast<float>(move - start_data);
float delta_time = static_cast<float>(get_time_now() - start_time);