correct orientation of ray intersection