Found my online stats calc code. It's in C but I can rework it. This should work better for FPS calc.
This commit is contained in:
parent
7a74877849
commit
e3e0f0a322
2 changed files with 90 additions and 0 deletions
25
stats.h
Normal file
25
stats.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef lcthw_stats_h
|
||||
#define lcthw_stats_h
|
||||
|
||||
typedef struct Stats {
|
||||
double sum;
|
||||
double sumsq;
|
||||
unsigned long n;
|
||||
double min;
|
||||
double max;
|
||||
} Stats;
|
||||
|
||||
Stats *Stats_recreate(double sum, double sumsq, unsigned long n,
|
||||
double min, double max);
|
||||
|
||||
Stats *Stats_create();
|
||||
|
||||
double Stats_mean(Stats * st);
|
||||
|
||||
double Stats_stddev(Stats * st);
|
||||
|
||||
void Stats_sample(Stats * st, double s);
|
||||
|
||||
void Stats_dump(Stats * st);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue