threshold fix, tested constants, generate_indices

I think the theshold calculation is completely correct now. Documenation is updated to describe that it is doing an integer divide on 100ths of a percent.

Test cases written for constants, generate_indices
 * constants are tested using the actual calculations that should have been used to generate constants
 * generate_indices tests ensure that all parameters are being used properly, multiple passes works, and that char_width needn't be divisible by 6