Right triangle perimeter calculation