Use nonnegative modulus for direction constraining