replace tabs with spaces
This commit is contained in:
parent
56b84f958b
commit
fc6f32ceac
1 changed files with 13 additions and 13 deletions
|
@ -36,24 +36,24 @@ Color_Rgb brighten(Color_Rgb c, f32 amt)
|
|||
internal
|
||||
void accum_dt_ms(Delta_Time_Accum &accum, f32 dt)
|
||||
{
|
||||
if (accum.count < accum.max) {
|
||||
assert(accum.start == 0);
|
||||
accum.base[accum.count++] = dt;
|
||||
} else {
|
||||
accum.base[accum.start++] = dt;
|
||||
if (accum.start == accum.max)
|
||||
accum.start = 0;
|
||||
}
|
||||
if (accum.count < accum.max) {
|
||||
assert(accum.start == 0);
|
||||
accum.base[accum.count++] = dt;
|
||||
} else {
|
||||
accum.base[accum.start++] = dt;
|
||||
if (accum.start == accum.max)
|
||||
accum.start = 0;
|
||||
}
|
||||
}
|
||||
|
||||
internal
|
||||
f32 calc_avg_dt_ms(const Delta_Time_Accum &accum)
|
||||
{
|
||||
f32 res = 0;
|
||||
for (u16 idx = 0; idx < accum.count; ++idx)
|
||||
res += accum.base[idx];
|
||||
if (accum.count) res /= accum.count;
|
||||
return res;
|
||||
f32 res = 0;
|
||||
for (u16 idx = 0; idx < accum.count; ++idx)
|
||||
res += accum.base[idx];
|
||||
if (accum.count) res /= accum.count;
|
||||
return res;
|
||||
}
|
||||
|
||||
internal
|
||||
|
|
Loading…
Reference in a new issue