Closed RectangleWorld closed 10 years ago
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.
count
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()
setMag()
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):
Since the vector is being normalized anyway, first dividing by
count
will have no effect.