Liang-Barsky algorithm

From dankwiki

An algorithm for line clipping, significantly more efficient than Cohen-Sutherland.