line-for-line port of IDL HEALPix utility ang2pix_ring.pro