#ifndef _tween_h_#define _tween_h_/*Copyright (c) 2013-2021 Devine Lu Linvega2018 web port by rezmason2021 C89 port by rezmasonPermission to use, copy, modify, and distribute this software for anypurpose with or without fee is hereby granted, provided that the abovecopyright notice and this permission notice appear in all copies.THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIESWITH REGARD TO THIS SOFTWARE.*//* This module drives tweens, an animation primitive that interpolates between its start and end value based on its progress from its start time to its duration*/typedef struct { double value, startValue, endValue; double start, duration; void (*onComplete)(void);} Tween;void Tween_Update(Tween *tween, double now);void Tween_Start(Tween *tween, double startValue, double endValue, double start, double duration, void (*onComplete)(void));void Tween_Stop(Tween *tween, int complete);#endif
#ifndef _tween_h_
#define _tween_h_
/*
Copyright (c) 2013-2021 Devine Lu Linvega
2018 web port by rezmason
2021 C89 port by rezmason
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE.
*/
/*
This module drives tweens, an animation primitive
that interpolates between its start and end value
based on its progress from its start time to its duration
*/
typedef struct {
double value, startValue, endValue;
double start, duration;
void (*onComplete)(void);
} Tween;
void Tween_Update(Tween *tween, double now);
void Tween_Start(Tween *tween, double startValue, double endValue, double start, double duration, void (*onComplete)(void));
void Tween_Stop(Tween *tween, int complete);
#endif