Good news, bad news
The good news is, I found out how to double my data sample.
The bad news is, I do this by fixing a bug in my code.
The lesson is, if you insist on having a local variable mask a member variable, make sure your compiler warnings are set to tell you that you are being an idiot!
Yeah, if the compiler would warn you in other situations as well
A few minutes ago I finished my 1000ths ray triangle intersection implementation.
I tested for an hour until I got sick of the code I wrote, rewrote everything to finally realize that I have been testing a ray against a triangle parallel to that ray *ugh*
A few minutes ago I finished my 1000ths ray triangle intersection implementation.
I tested for an hour until I got sick of the code I wrote, rewrote everything to finally realize that I have been testing a ray against a triangle parallel to that ray *ugh*
Quote:Original post by King of Men
The good news is, I found out how to double my data sample.
The bad news is, I do this by fixing a bug in my code.
The lesson is, if you insist on having a local variable mask a member variable, make sure your compiler warnings are set to tell you that you are being an idiot!
I don't see how this is bad news? I see it as killing two birds with one stone.
It's bad news because that bug has been around for several months, messing up my plots and conclusions. I found it in the writing-up-results stage, which is highly embarrassing.
With Visual Assist X you can highlight your global and local variables specially.
I know why my source code looks like a rainbow =)
I know why my source code looks like a rainbow =)
you could also just adopt a naming convetion for local and global variables. Its not uncommon to see Global variables appending _G on their end or beginning to signify they're global.
<insert obligatory remark about how some people really like hungarian notation and some really don't>
Cheers
Chris
<insert obligatory remark about how some people really like hungarian notation and some really don't>
Cheers
Chris
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement