pnc/ATV — pull request #4 by jcoleman (2013-03-05 19:05:15+00:00)
Title: Fix ordering bug

I messed up the original algorithm slightly...partially because of a bug in my own test code. This fixes the bug as well as adds a guard against incorrect usage.