By bloid
via codeodor.com
Published: Jul 08 2008 / 11:55
Several days ago I wrote about common excuses people use for commenting code and things you can do to get rid of them. I took the stance that rarely is there something so complex that it really requires comments.
Comments
Tantalus replied ago:
So, before it was open sourced and famous, if you came across this bit of code:
float InvSqrt (float x){
float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
}
you wouldn't want a little comment hint to help you out?
Voters For This Link (5)
Voters Against This Link (2)