Simple typo substitution

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Simple typo substitution

      On page 413 of the 3rd edition, you have code to demonstrate a unit vector.

      Vec3 unit = v / length;

      but when you go to print out the values, you reference the original x instead of the new unit which is what I think you meant to do.

      cout "Unit vector: X=" << v.x << ...

      should be

      cout "Unit vector: X=" << unit.x << ...

      Fortunately, not everyone fell asleep reading that chapter ;)

      The post was edited 1 time, last by grchadbourne ().

    • RE: Simple typo substitution

      Given the tight timeline on this new edition, and the fact I was crunching on Ghostbusters, I wouldn't be surprised if I was the one asleep when I WROTE this chapter!

      Thanks for the correction.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • RE: Simple typo substitution

      I'm pretty sure the entire writing team was crunching.... I know I was crunching hard on Drawn to Life. Gotta love the double-crunch!

      -Rez
    • What about the double secret double crunch?
      Mr.Mike
      Author, Programmer, Brewer, Patriot