Boomerang detection based on gap between ideal and current lines