Possible coding error in NeHe SDK

Started by
0 comments, last by gregs 15 years, 5 months ago
Please excuse me if this possible error has been reported before. I looked but could not find it. I think I have found a coding error in the NeHe SDK, in the Vector class contained in the geometry.h file. The code reads:

Vector operator *= (float f)
  {
    x+=f; y+=f; z+=f; w+=f; return *this;
  }


I may be mistaken but shouldn't this read:

Vector operator *= (float f)
  {
    x*=f; y*=f; z*=f; w*=f; return *this;
  }


I know this is only a minor problem but if this method is being used then it will give incorrect results.
Advertisement
Quite right. Good catch. Admittedly that SDK is quite old and out of date, but it doesn't excuse me from not paying attention when I cut and paste! I'd better see about fixing it.

This topic is closed to new replies.

Advertisement