Judging by the name of the variable min, you would like it to be as large as possible. Thus, any comparison with this value will be a lower value and will update yours minValue.
float minValue = std::numeric_limits<float>::max();
PS do not minname your variable or you run the risk of shading the name.
source
share