By circumference milling with 5-axis machine or machining center has quite the machining efficiency and the surface quality of the products been improved. But when inclined inside surface of cavity is circumference milled with the default linear interpolation of rotation angle algorithm, it results in a serious non-linear error, which takes on over cutting or under cutting, e.g. the inclined plane will be over milled by the machine with dual swivel-head machining center. In order to resolve this problem, the direct interpolation algorithm of tool orientation is developed after analyzing the algorithm of linear interpolation of rotation angles and its non-linear error is. The algorithm is reported and tested with the object of a machine with AB-axis swivel head. The testing results proved that it can resolve the problem of non-linear error.