util.c: rename tick_ftimer_repeat to repeat_ftimer

This commit is contained in:
veclav talica 2024-07-09 15:37:03 +03:00
parent f98f9e1300
commit 31167047a7
2 changed files with 3 additions and 3 deletions

View File

@ -194,7 +194,7 @@ void tick_ftimer(float *value) {
*value = MAX(*value - ((float)ctx.delta_time / (float)ctx.clocks_per_second), 0.0f); *value = MAX(*value - ((float)ctx.delta_time / (float)ctx.clocks_per_second), 0.0f);
} }
bool tick_ftimer_repeat(float *value, float at) { bool repeat_ftimer(float *value, float at) {
*value -= (float)ctx.delta_time / (float)ctx.clocks_per_second; *value -= (float)ctx.delta_time / (float)ctx.clocks_per_second;
if (*value < 0.0f) { if (*value < 0.0f) {
*value += at; *value += at;

View File

@ -123,9 +123,9 @@ void tick_timer(int *value);
/* note that it should be decremented only on the next tick after its creation */ /* note that it should be decremented only on the next tick after its creation */
void tick_ftimer(float *value); void tick_ftimer(float *value);
/* same as `tick_ftimer` but instaed of clamping it repeats */ /* same as `tick_ftimer` but instead of clamping it repeats */
/* returns true if value was cycled */ /* returns true if value was cycled */
bool tick_ftimer_repeat(float *value, float at); bool repeat_ftimer(float *value, float at);
#endif #endif