blueyellow,
The angle of diffraction is determined by the Bragg condition, namely that the difference in path length from one atom to the next is an integral number of wavelengths. The writeup you refer to does assume that θi = θr, but this is only a special case. If you draw the same diagram and let θi and θr be different, you'll see that the Bragg condition becomes
d(sin θi + sin θr) = nλ
(Most references use instead the angle that the electron's path makes with the normal, in which case replace sin by cos.)