Usage of R-value reference
0
$begingroup$
I had submitted below code for review. //centerX, centerY, xradius, yradius is some float value for (int i = 0; i < num_segment; i++) { float theta = i * M_PI / 90; ====> got an code review here x = centerX + (xradius * cos(theta)); y = centerY + (yradius * sin(theta)); .... } Code review comment : Did you consider an rvalue reference here like "const float theta&& = ..." I said cos and sin from math.h is not taking rValue reference, so I don't see any need for using rvalue reference here. Is my response correct? or do we need to use rValue reference here?
c++ c++11
share
asked 9...