Reputation: 539
float App::fresnelReflectTerm(float etaPos, float etaNeg, float cos_theta_i)
{
float theta_i;
theta_i = acos(cos_theta_i);
...
This generates an "ambiguous call to overloaded function error" and says that there are four options:
float acos(float fValue)
double acos(double _X)
float acos(float _X)
long double acos(long double _X)
I suspect that the problem is that the first and third both take a float arg and return a float value. But can anyone give me a hint about how I might determine (I'm using Visual Studio) where those four functions came from, so that I can eliminate the duplication, for instance? Or perhaps just give me a hint on how to get around this problem.
Upvotes: 2
Views: 2083