Login Page - Create Account

Support Board


Date/Time: Sun, 23 Feb 2025 21:46:06 +0000



Post From: Max/Min of more than 2 ScFloatArrays

[2021-02-19 00:07:25]
norvik_ - Posts: 106
std::vector<float>values{Study1Array[BarIndex], Study2Array[BarIndex], Study3Array[BarIndex], Study4Array[BarIndex], Study5Array[BarIndex], Study6Array[BarIndex], Study7Array[BarIndex]};

auto result = std::max_elemnt(values.begin(),values.end());
float max_value = *result;

Don't forget #include<algorithm> :)
Date Time Of Last Edit: 2021-02-19 00:09:34