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
|
internal
|
||||||
void accum_dt_ms(Delta_Time_Accum &accum, f32 dt)
|
void accum_dt_ms(Delta_Time_Accum &accum, f32 dt)
|
||||||
{
|
{
|
||||||
if (accum.count < accum.max) {
|
if (accum.count < accum.max) {
|
||||||
assert(accum.start == 0);
|
assert(accum.start == 0);
|
||||||
accum.base[accum.count++] = dt;
|
accum.base[accum.count++] = dt;
|
||||||
} else {
|
} else {
|
||||||
accum.base[accum.start++] = dt;
|
accum.base[accum.start++] = dt;
|
||||||
if (accum.start == accum.max)
|
if (accum.start == accum.max)
|
||||||
accum.start = 0;
|
accum.start = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal
|
internal
|
||||||
f32 calc_avg_dt_ms(const Delta_Time_Accum &accum)
|
f32 calc_avg_dt_ms(const Delta_Time_Accum &accum)
|
||||||
{
|
{
|
||||||
f32 res = 0;
|
f32 res = 0;
|
||||||
for (u16 idx = 0; idx < accum.count; ++idx)
|
for (u16 idx = 0; idx < accum.count; ++idx)
|
||||||
res += accum.base[idx];
|
res += accum.base[idx];
|
||||||
if (accum.count) res /= accum.count;
|
if (accum.count) res /= accum.count;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal
|
internal
|
||||||
|
|
Loading…
Reference in a new issue