I came across this code in some existing codebase:
double rad = ComputeCurviness();
double off = Math.Abs(rad);
if (rad < 0) off = -off;
It seems to be basically just making off
equal to rad
. The variables are used interchangeably later in the code. Is there any reason to leave this code in?