Write isBetweenXMinAndXMax