When a ray of light from air enters a denser medium, it: