//************************************************************************** // header file for a library of auxiliary mathematical functions //************************************************************************** #ifndef MYMATH_H #define MYMATH_H const float PI = 3.1415926; const double TOLERANCE = 0.0000001; //************************************************************************ // function to return the gcd of two integers //************************************************************************ int gcd(int a, int b); //************************************************************************ // function to find and return the lowest commmom multiple of two numbers //************************************************************************ int lcm(int a, int b); //************************************************************************ // function to exchange the values stored in two integer locations //************************************************************************ void swap(int& a, int& b); //************************************************************************ // function to exchange the values stored in two float locations //************************************************************************ void swap(float& a, float& b); //************************************************************************ // function to determine if two floating point numbers are "equal", // that is there are within TOLERANCE of each other. //************************************************************************ bool dEqual(double a, double b); #endif