c# - Is there any reason this isn't redundant code? -
I came across this code in some existing codebase:
double-rad = computer activation ( ); Double closed = Math.Abs (rad); If (rad <0) off = -off;
It seems that basically making just off
is equal to rad
. Variables are later used in code in one word. Is there any reason to leave this code?
If rad
is -0.0, off
+0.0 You will need to inspect the code to see if it really will make a difference. It's equal to calculations and comparisons, but -0.0 is negative, which you can find out if you try hard.
Comments
Post a Comment