Okay, so I took at a look at your degmath.h header. One problem I see is that you did not declare those functions as inline, which would likely lead to linker errors if a user included that header in more than one translation unit (as in source file + headers).
Another problem is that you have a using directive (using namespace std) in the global namespace scope. This is a no-no for a header file. You should also #include <cmath> instead of <math.h>. Note that <cmath> has overloads for the various functions, but you only defined the float versions. You should overload for double and long double, for completeness.
Looking at your implementation of dsin(), I notice that you just return the result of sin() directly. This means that your users would be passing a value in degrees, but get an output in radians, which would certainly be confusing.
To illustrate what I was talking about, you could define:
Code:
inline float deg2rad(float x)
{
return x * (3.141593f / 180.0f);
}
inline float rad2deg(float x)
{
return x * (180.0f / 3.141593f);
}
Now if you still want your dsin wrapper of sin, you could write:
Code:
inline float dsin(float x)
{
return rad2deg(std::sin(deg2rad(x)));
}
Oh, and consider placing your library of functions in a suitable namespace rather than dumping them in the global namespace.