Canadian0469

05-17-2008, 05:35 PM

Hi,

I'm trying to load a custom matrix that I define as follows:

GLfloat matrix[16] = {cos(45), 0, -sin(45), 0, 0, 2, 0, 0,sin(45), 0, cos(45), 0,0, cos(45), 0, 1};

but I keeping getting this compile-time error:

error C2668: 'cos' : ambiguous call to overloaded function

1> c:\program files\microsoft visual studio 8\vc\include\math.h(551): could be 'long double cos(long double)'

1> c:\program files\microsoft visual studio 8\vc\include\math.h(503): or 'float cos(float)'

1> c:\program files\microsoft visual studio 8\vc\include\math.h(116): or 'double cos(double)'

Anyone know how I can get around this?

Thanks,

Canadian0469

I'm trying to load a custom matrix that I define as follows:

GLfloat matrix[16] = {cos(45), 0, -sin(45), 0, 0, 2, 0, 0,sin(45), 0, cos(45), 0,0, cos(45), 0, 1};

but I keeping getting this compile-time error:

error C2668: 'cos' : ambiguous call to overloaded function

1> c:\program files\microsoft visual studio 8\vc\include\math.h(551): could be 'long double cos(long double)'

1> c:\program files\microsoft visual studio 8\vc\include\math.h(503): or 'float cos(float)'

1> c:\program files\microsoft visual studio 8\vc\include\math.h(116): or 'double cos(double)'

Anyone know how I can get around this?

Thanks,

Canadian0469