Ignore:
Timestamp:
Aug 22, 2010, 2:55:40 AM (10 years ago)
Author:
sam
Message:

Refactor stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/profiler.cpp

    r150 r154  
    3030            history[i] = 0.0f;
    3131        frame = 0;
    32         mean = max = 0.0f;
     32        avg = max = 0.0f;
    3333    }
    3434
     
    3737    Timer timer;
    3838    int frame;
    39     float mean, max;
     39    float avg, max;
    4040}
    4141data[Profiler::STAT_COUNT];
     
    5656    data[id].history[data->frame % ProfilerData::HISTORY] = deltams;
    5757    data[id].frame++;
    58     data[id].mean = 0.0f;
     58    data[id].avg = 0.0f;
    5959    data[id].max = 0.0f;
    6060
    6161    for (int i = 0; i < ProfilerData::HISTORY; i++)
    6262    {
    63         data[id].mean += data[id].history[i];
     63        data[id].avg += data[id].history[i];
    6464        if (data[id].history[i] > data[id].max)
    6565            data[id].max = data[id].history[i];
    6666    }
    67     data[id].mean /= ProfilerData::HISTORY;
     67    data[id].avg /= ProfilerData::HISTORY;
    6868}
    6969
    70 float Profiler::GetMean(int id)
     70float Profiler::GetAvg(int id)
    7171{
    72     return data[id].mean;
     72    return data[id].avg;
    7373}
    7474
Note: See TracChangeset for help on using the changeset viewer.