Merge branch 'master' of ssh://fuzzle.org/home/vcs/git/psyn

master
Peter Nelson 2010-01-20 10:46:55 +00:00
commit e3e6fa797f
1 changed files with 16 additions and 0 deletions

16
control.h 100644
View File

@ -0,0 +1,16 @@
struct control_t
{
float value;
float step;
};
static inline void control_setstep(struct control_t *control, float value, uint32_t samples)
{
control->step = (value - control->value) / samples;
}
static inline void control_tick(struct control_t *control)
{
control->value += control->step;
}