##// END OF EJS Templates
Add int data index in CosinusProvider
Alexandre Leroux -
r137:a659cfcd7e23
parent child
Show More
@@ -21,8 +21,8 CosinusProvider::retrieveData(const DataProviderParameters &parameters) const
21 auto scalarSeries
21 auto scalarSeries
22 = std::make_unique<ScalarSeries>(end - start, QStringLiteral("t"), QStringLiteral(""));
22 = std::make_unique<ScalarSeries>(end - start, QStringLiteral("t"), QStringLiteral(""));
23
23
24 for (auto time = start; time < end; ++time) {
24 auto dataIndex = 0;
25 auto dataIndex = time - start;
25 for (auto time = start; time < end; ++time, ++dataIndex) {
26 scalarSeries->setData(dataIndex, time, std::cos(time));
26 scalarSeries->setData(dataIndex, time, std::cos(time));
27 }
27 }
28
28
General Comments 0
You need to be logged in to leave comments. Login now