Updated the rangeContainsValueModulo... function to use absolute values (modulus algorithms often break with negative numbers)