C2668 - Ambiguous Call to Overloaded Function
I have a problem with my code, and I need some help... I'm doing some testing with DirectX8 and I'm trying to use sin() and cos() to assist me(yes, I have math.h included), but when I do, I get a C2668(error referenced in thread title). The code in question is below... Can someone help me?
Code:
int iX, iY;
for(iY = 0; iY < 256; iY++) {
for(iX = 0; iX < 256; iX++) {
int iPower = (int)(sin(iX * iY) * 128 + cos(iX * iY) * 128);
piSurfaceBuffer[iX + iY* (kLockedRect.Pitch >> 2)] = D3DCOLOR_XRGB(iPower, iPower, iPower);
}
}