To check all of the Rafter Tools App results I draw geometric roof framing layouts in Google Sketchup. To make sure it's constructable and the java mathematical results are correct. Here's a situation where you have an 8:12 main roof slope angle and an adjacent 12:12 roof slope angle. To calculate the main roof common rafter lengths you just deduct 1/2 the thickness of the ridge for the main common rafter length. However, you can't deduct 1/2 the thickness of the ridge for the adjacent 12:12 king common rafter length. You will have to chamfer the end of the ridge on a unequal pitched roof to keep the ridge in the roof plane alignment. The Rafter Tools App Irregular Hip rafter function calculates the correct king common rafter length for unequal pitched hip rafter roofs.
The correct way to calculate the minor pitch king common rafter, keeping all of the roof framing members in the roof planes, is to use the major and minor plan angles.
minor ridge deduction run = (ridge width * 0.5) ÷ tan(major plan angle)