#ifndef morpheo_Average #define morpheo_Average /* * $Id$ * * [ Description ] * */ namespace morpheo { inline double average (double val, double val_max) {return ((val_max == 0)?0:(val/val_max));} inline double average (uint32_t val, double val_max) {return (average(static_cast(val), val_max ));} inline double average (double val, uint32_t val_max) {return (average( val ,static_cast(val_max)));} inline double average (uint32_t val, uint32_t val_max) {return (average(static_cast(val),static_cast(val_max)));} }; // end namespace morpheo #endif