Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
fungmath.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef FUNGMATH_H
00018 #define FUNGMATH_H
00019
00020 #define ROUND(a) (floor(a) - a < ceil(a) - a) ? floor(a) : ceil(a)
00021 #define ABS(a) ( a >= 0 ) ? a : a*(-1)
00022 #define MIN(a,b) ( a < b ) ? a : b;
00023 #define MAX(a,b) ( a > b ) ? a : b;
00024
00025 #define itoa(value,str) sprintf((str),"%d",(value))
00026 #define dtoa(value,str) sprintf((str),"%.2f",(value))
00027
00028 int num_digits( int i );
00029
00030 int fibonacci( unsigned int );
00031 int factorial( unsigned int );
00032 int iRand( float, float );
00033 float fRand( float, float );
00034
00035 #endif //FUNGMATH_H
|