Updated the rangeContainsValueModulo... function to use absolute values