diff --git a/c_os/lib/MyMath.cc b/c_os/lib/MyMath.cc deleted file mode 100755 index d52df8b..0000000 --- a/c_os/lib/MyMath.cc +++ /dev/null @@ -1,26 +0,0 @@ -#include "MyMath.h" - -// NOTE: I added this file - -int mmath::min(int a, int b) { - if (a < b) { return a; } - return b; -} - -int mmath::max(int a, int b) { - if (a < b) { return b; } - return a; -} - -int mmath::abs(int a) { - if (a < 0) { return -a; } - return a; -} - -int mmath::pow(int a, unsigned int b) { - int result = 1; - for (unsigned int i = 0; i < b; ++i) { - result = result * a; - } - return result; -} diff --git a/c_os/lib/MyMath.h b/c_os/lib/MyMath.h deleted file mode 100755 index 859156e..0000000 --- a/c_os/lib/MyMath.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef __MYMATH_INCLUDE_H_ -#define __MYMATH_INCLUDE_H_ - -// NOTE: I added this file - -namespace mmath { - int min(int, int); - int max(int, int); - int abs(int); - int pow(int, unsigned int); -} // namespace mmath - -#endif