Unnecessary step in Example 6.7
RectangleWorld opened this issue · comments
Just started reading this book online and it's great! I'll be ordering a print version ASAP.
In example 6.7, there seems to be one unnecessary step (unless I'm missing something):
sum.div(count);
sum.normalize();
Since the vector is being normalized anyway, first dividing by count
will have no effect.
Ok, I simplified the examples and added a sentence: "(In fact, we don't have to divide by count anymore since we are manually setting the magnitude.)" I also changed the code to use setMag()