IsTriangle : refactor