ReSalut
j'aimerai demander si mes types de données ont étés bien convertir, car j'aimerai avoir des resultats en Integer:
Mon code:
void DrehmatrixKonver1(HDC hdc,COLORREF farbe, int Xzentrum, int Yzentrum)
{
double RADIUS = 100.5; int x0
0, y0 RADIUS; int x1
0, y1 RADIUS;
double theta = 0.0;
double dTheta = 0.0;
// Minimal theta berechnen
//y1 = 1;
//dTheta = acos(sqrt(9999.0) / RADIUS);
dTheta = (2.0/360.0)*2*PI;
SetPixel(hdc, x1 + Xzentrum, y1 + Yzentrum, RGB(255, 255, 255));
x0 = x1;
y0 = y1;
while(theta <= 2.0 * PI)
{
theta += dTheta;
x1 = int(x0 * cos(dTheta) - y0 * sin(dTheta));
y1 = int(x0 * sin(dTheta) + y0 * cos(dTheta));
SetPixel(hdc, x1 + Xzentrum, y1 + Yzentrum, RGB(255, 255, 255));
x0 = x1;
y0 = y1;
}
}
Merci bien de m'aider
A++