R - Reconnaître un triangle rectangle