01: // Math.mpp 02: /* 03: Mathematics module 04: */ 05:
06: namespace Math { 07: const double PI = 3.1415927; 08:
09: inline double sqr(double x) { 10: return x * x; 11: } 12:
13: inline double addPercentage(double val, double x) { 14: return ( val * ( 1 + x ) ); 15: } 16:
17: inline double removePercentage(double val, double x) { 18: return ( val - ( val * x ) ); 19: } 20: }