Fix angle calculation