calculate_angle instance and class methods