First cut of code that passed the unit tests for mod activations,
however it uses / operations and doesn't handle the case where the
channel value is on the boundary between two ranges.
Handle channel boundaries better.
More efficient, less code, easier to understand.