Function inOutQuad