Right-angled triangle formulas