I test the absolute values of the difference between the coordinates, instead of checking both the negative and positive difference. Also, by chaining all the coordinates after another with AND (&&) operators in between the final result is true if all the differences in the coordinate values are below the provided length (len).