Simplified rotation direction checking.
Merge branch 'master' of https://github.com/jmptable/logica
Reorganization to switch to using prototype as the main implementation.