schteppe/cannon.js — pull request #65 by airbaggins (2013-03-27 21:23:07+00:00)
Title: Small Ray collision optimization & Fixed test cases

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.