ich hab eine Division die immer wieder kommt mit nur einem Veränderten Wert in einer Schleife.
x / 64 = x.x
So jetzt möchte einmal nur die Vorkommastelle und einmal nur die stellen nach dem Komma.
Nur bei meinem Ansatz stimmt das noch nicht so ganz.
Code: Alles auswählen
for(int y = 0; y <= imgImage.height() -1; y++)
{
for(int x = 0; x <= imgImage.width() -1; x++)
{
double dDiv = imgImage.width() / nCount;
double dSegmentNumberAndK = x / dDiv;
QString strValue = QString::number(dSegmentNumberAndK);
QStringList list1 = strValue.split(".");
QString strSegment = list1.first();
QString strK = "0." + list1.last();
int nSegment = strSegment.toInt();
double dK = strK.toDouble();
}
Gruß
Qt-nator