mrdoob/three.js — pull request #3067 by drewnoakes (2013-02-08 22:35:53+00:00)
Title: Fixed bug in `Vector3.angleTo` and added unit test

For some identical vectors, the `angleTo` function was returning `NaN` because, due to the numerical imprecision of floating point numbers, the argument to `Math.acos` was something like `1.000000000001`, which is undefined.

I added a unit test for this and other uses of `Vector3.angleTo`.