|
Hi everybody,
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 ?
double RS_Ellipse::areaLineIntegral() const
{
(...)
const double& cx=data.center.x;
const double aE=getAngle();
const double& a0=data.angle1;
const double& a1=data.angle2;
(...)
}
|