diff --git a/src/render.cpp b/src/render.cpp index 6b568ef..7437a41 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -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