Fix triangle perimeter formula.