Good, good

This commit is contained in:
XANTRONIX 2024-01-19 23:22:56 -05:00
parent b7d2ea6bfa
commit a0e19b3ce4

View file

@ -4,8 +4,6 @@
#include <hexagram/anim.h>
void hexagram_anim_init(hexagram_anim *anim) {
anim->current = 0;
gettimeofday(&anim->start, NULL);
}
@ -28,7 +26,7 @@ static inline size_t stop_index(hexagram_anim *anim, double offset) {
return 0;
}
int hexagram_anim_step(hexagram_anim *anim, cairo_t *bg, cairo_t *fg) {
int hexagram_anim_step(hexagram_anim *anim) {
struct timeval tv;
double offset = 0.0, interval, progress;
size_t i, a;
@ -48,7 +46,7 @@ int hexagram_anim_step(hexagram_anim *anim, cairo_t *bg, cairo_t *fg) {
continue;
}
if (interval < offset + duration) {
if (interval <= offset + duration) {
break;
}