I was wondering why a const reference is used in the function below (in rs_ellipse.cpp) for the doubles cx, a0, a1. Given that those are primitive types, what is the benefit of doing this vs say, double cx=data.center.x, or const double cx=data.center.x ?
Hey, thanks for the prompt and complete response! :)
It crossed my mind too that it could be to make the code faster, which I would understand if the variables were arrays or objects, but with a double I wouldn’t know what to expect. Being new to CAD software, to me this looked like the developer was trying to save memory, but I couldn't really see the benefit in this case so I thought I was missing something...