This paper presents a method to efficiently solve the control allocation problem of vessels propelled by two azimuth thrusters with limited panning range. The use of rotatable thrusters results in a configuration matrix that, in the context of control allocation, typically leads to a constrained nonlinear optimization problem. It is shown, how this can be transformed into an easy to solve scalar unconstrained problem by using simple geometrical relations. Using a cost criterion from the literature for minimum power consumption, however, leads to discontinuities due to the limited panning angle range of the thrusters. By introducing a parameterized cost function, the discontinuities in the panning motion of the thrusters can be largely avoided.