Ray-square intersection finished