Solving for angles and sides in a triangle