Fixed a bug that caused an infinite loop if a ray grazes the very edge
of the cylinder (on the outer radius) by adding an equal_zero method to
misc.cc and using that to test whether nr == 0.