When you have refractive index of material A with respect to B, that is,nAB
there are three formulae :
nAB =na / nb = vb / va = sin i / sin r
The second part is not so clear..which rays are you talking about ?
Direction of incident light is at an angular separation of critical angle to the normal...as is obvious from the formula..
Direction of refracted light is perpendicular to the normal...as is obvious,again, from the formula..
Or are you asking about something else?