gtk2/tests/variable.h
Owen W. Taylor b7063509f8 tests/animated-resizing: Split frame statistics out into a separate file
Split the code for computing frame rate and latency into a separate file
so we can use it from multiple tests.
2013-04-23 14:04:40 -04:00

25 lines
696 B
C

#ifndef __VARIABLE_H__
#define __VARAIBLE_H__
typedef struct
{
double weight;
double sum;
double sum2;
} Variable;
#define VARIABLE_INIT { 0.0, 0.0, 0.0 }
void variable_init (Variable *variable);
void variable_add_weighted (Variable *variable,
double value,
double weight);
void variable_add (Variable *variable,
double value);
double variable_mean (Variable *variable);
double variable_standard_deviation (Variable *variable);
void variable_reset (Variable *variable);
#endif /* __VARIABLE_H__ */