Determining trigonometric values and angles