onlyX / onlyY

Added an option to only check the X or Y distance