switch to mode enum rather than normalised flag

This is actually the residual effect of patches to reintroduce angle
distance and remove it again.