Implement angle calculation