schteppe/cannon.js — pull request #66 by airbaggins (2013-03-27 21:24:14+00:00)
Title: Ray collision tests and optimizations

Few small changes:

Ray.js pointInTriangle:
* Lazy evaluation of u and v to avoid unnecessary multiplications
* Replaced division by a common factor only to compare with 1 with comparison with the factor itself

Ray.js test:
* Changed box creation code to use the Box class to avoid the triangle handedness warnings
* Added some corner case tests to be sure that optimization works.