Improved rotation computation.