Fix CSV export of floating point data
authorMartin Lambers <marlam@marlam.de>
Wed, 20 Mar 2019 09:46:55 +0000 (10:46 +0100)
committerMartin Lambers <marlam@marlam.de>
Wed, 20 Mar 2019 09:46:55 +0000 (10:46 +0100)
libcamsim/exporter.cpp

index 3390d17..ed70a18 100644 (file)
@@ -413,7 +413,7 @@ bool Exporter::writeCSV(const QString fileName, const QList<TexData> dataList, c
                         element.append(QString::number(*(static_cast<const unsigned int*>(p))));
                         break;
                     case GL_FLOAT:
-                        element.append(QString::number(*(static_cast<const unsigned int*>(p)), 'g', 9));
+                        element.append(QString::number(*(static_cast<const float*>(p)), 'g', 9));
                         break;
                     }
                     if (x != data.width() - 1)