0

I don't understand but VS2019 throws undeclared identifyer in my face despite having

#define _USE_MATH_DEFINES // for C++
#include <cmath>
#include <iostream>

Following function is an example when I get this:

namespace Math
{
    double Rad2Deg(double val)
    {
        return
        {
            180 * val / M_PI
        };
    };
}

EDIT: I googled and all I get is that I use the above mentioned two lines or I define it manually. I'd prefer not to define it manually.

I see the comment on the closing request: Thanks! That answer is gold.

0 Answers0