It looks to me like you are actually testing isRightAngledTriangle()
. There are some vids on the net showing how to determine the ‘triangularness’ of three lines. I didn’t watch, but this looks like it might help: https://www.youtube.com/watch?v=NGHZVjYqA2s.
hth