What happens if I enter thirdAngle(0,0)?
you are right, I just wrote it very fast and I did not think about this case.
TDD will help a lot in these situations.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.