triangle util functions, isosceles test function